diff --git a/pkg/webhooks/annotations.go b/pkg/webhooks/annotations.go index eddded1cde..c44e03017d 100644 --- a/pkg/webhooks/annotations.go +++ b/pkg/webhooks/annotations.go @@ -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 { diff --git a/pkg/webhooks/server.go b/pkg/webhooks/server.go index 9171dda8f5..605198310d 100644 --- a/pkg/webhooks/server.go +++ b/pkg/webhooks/server.go @@ -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{