mirror of
https://github.com/kyverno/kyverno.git
synced 2025-03-31 03:45:17 +00:00
Rename function
This commit is contained in:
parent
0952ccec82
commit
eec21ea5ca
2 changed files with 3 additions and 3 deletions
|
@ -152,7 +152,7 @@ func annotationFromPolicyResponse(policyResponse response.PolicyResponse, log lo
|
|||
}
|
||||
|
||||
// checkPodTemplateAnn checks if a Pod has annotation "pod-policies.kyverno.io/autogen-applied"
|
||||
func checkPodTemplateAnn(resource unstructured.Unstructured) bool {
|
||||
func checkPodTemplateAnnotation(resource unstructured.Unstructured) bool {
|
||||
if resource.GetKind() == "Pod" {
|
||||
ann := resource.GetAnnotations()
|
||||
if _, ok := ann[engine.PodTemplateAnnotation]; ok {
|
||||
|
|
|
@ -226,7 +226,7 @@ func (ws *WebhookServer) handleMutateAdmissionRequest(request *v1beta1.Admission
|
|||
}
|
||||
}
|
||||
|
||||
if checkPodTemplateAnn(resource) {
|
||||
if checkPodTemplateAnnotation(resource) {
|
||||
return &v1beta1.AdmissionResponse{
|
||||
Allowed: true,
|
||||
Result: &metav1.Status{
|
||||
|
@ -320,7 +320,7 @@ func (ws *WebhookServer) handleValidateAdmissionRequest(request *v1beta1.Admissi
|
|||
}
|
||||
}
|
||||
|
||||
if checkPodTemplateAnn(resource) {
|
||||
if checkPodTemplateAnnotation(resource) {
|
||||
return &v1beta1.AdmissionResponse{
|
||||
Allowed: true,
|
||||
Result: &metav1.Status{
|
||||
|
|
Loading…
Add table
Reference in a new issue