From d5780746325ca89a22d5c11dd39e40414cc71a3b Mon Sep 17 00:00:00 2001 From: Piotr Halama Date: Thu, 17 Oct 2024 09:07:48 +0200 Subject: [PATCH] Add reinvocationPolicy (#300) --- charts/warden/charts/warden-admission/templates/webhook.yaml | 2 +- internal/webhook/webhook.go | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/charts/warden/charts/warden-admission/templates/webhook.yaml b/charts/warden/charts/warden-admission/templates/webhook.yaml index a1809aff..45b4214e 100644 --- a/charts/warden/charts/warden-admission/templates/webhook.yaml +++ b/charts/warden/charts/warden-admission/templates/webhook.yaml @@ -54,4 +54,4 @@ webhooks: namespaceSelector: matchLabels: namespaces.warden.kyma-project.io/validate: enabled - + reinvocationPolicy: IfNeeded diff --git a/internal/webhook/webhook.go b/internal/webhook/webhook.go index a7f74faf..62e5e717 100644 --- a/internal/webhook/webhook.go +++ b/internal/webhook/webhook.go @@ -87,7 +87,7 @@ func createMutatingWebhookConfiguration(config WebhookConfig) *admissionregistra func getFunctionMutatingWebhookCfg(config WebhookConfig) admissionregistrationv1.MutatingWebhook { failurePolicy := admissionregistrationv1.Ignore matchPolicy := admissionregistrationv1.Exact - reinvocationPolicy := admissionregistrationv1.NeverReinvocationPolicy + reinvocationPolicy := admissionregistrationv1.IfNeededReinvocationPolicy scope := admissionregistrationv1.AllScopes sideEffects := admissionregistrationv1.SideEffectClassNone