From 744d151468e85e82ba7484889a3ffc73aab2a0a7 Mon Sep 17 00:00:00 2001 From: shuting Date: Tue, 3 Jan 2023 23:51:14 +0800 Subject: [PATCH] cleanup new validate webhooks (#5851) Signed-off-by: ShutingZhao Signed-off-by: ShutingZhao --- charts/kyverno/templates/helm-pre-delete-hook.yaml | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/charts/kyverno/templates/helm-pre-delete-hook.yaml b/charts/kyverno/templates/helm-pre-delete-hook.yaml index bf80422b8d..ac1b02fd6a 100644 --- a/charts/kyverno/templates/helm-pre-delete-hook.yaml +++ b/charts/kyverno/templates/helm-pre-delete-hook.yaml @@ -19,11 +19,8 @@ spec: - sh - '-c' - >- - kubectl delete validatingwebhookconfiguration kyverno-policy-validating-webhook-cfg; - kubectl delete validatingwebhookconfiguration kyverno-resource-validating-webhook-cfg; - kubectl delete mutatingwebhookconfiguration kyverno-policy-mutating-webhook-cfg; - kubectl delete mutatingwebhookconfiguration kyverno-resource-mutating-webhook-cfg; - kubectl delete mutatingwebhookconfiguration kyverno-verify-mutating-webhook-cfg; + kubectl delete validatingwebhookconfiguration -l webhook.kyverno.io/managed-by=kyverno; + kubectl delete mutatingwebhookconfiguration -l webhook.kyverno.io/managed-by=kyverno; restartPolicy: Never backoffLimit: 2 {{- end }} \ No newline at end of file