1
0
Fork 0
mirror of https://github.com/kyverno/kyverno.git synced 2025-03-31 03:45:17 +00:00

Rename function

This commit is contained in:
Shuting Zhao 2020-05-16 21:24:37 -07:00
parent 0952ccec82
commit eec21ea5ca
2 changed files with 3 additions and 3 deletions

View file

@ -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 {

View file

@ -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{