From 8d2b68dc4663dd5616cc538a11f15792d8065176 Mon Sep 17 00:00:00 2001 From: Erik Godding Boye Date: Wed, 27 Sep 2023 12:04:16 +0200 Subject: [PATCH] fix(helm): skip deployment replicas validation in non-int value (#8539) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * fix(helm): skip deployment replicas validation in non-int value Signed-off-by: Erik Godding Boye * fix Signed-off-by: Charles-Edouard Brétéché --------- Signed-off-by: Erik Godding Boye Signed-off-by: Charles-Edouard Brétéché Co-authored-by: Charles-Edouard Brétéché --- charts/kyverno/templates/_helpers/_deployment.tpl | 6 +++++- charts/kyverno/values.yaml | 8 ++++---- 2 files changed, 9 insertions(+), 5 deletions(-) diff --git a/charts/kyverno/templates/_helpers/_deployment.tpl b/charts/kyverno/templates/_helpers/_deployment.tpl index 2b6ed419ef..ca93767613 100644 --- a/charts/kyverno/templates/_helpers/_deployment.tpl +++ b/charts/kyverno/templates/_helpers/_deployment.tpl @@ -1,8 +1,12 @@ {{/* vim: set filetype=mustache: */}} {{- define "kyverno.deployment.replicas" -}} - {{- if eq (int (default 1 .)) 0 -}} + {{- if not (eq . nil) -}} + {{- if not (kindIs "string" .) -}} + {{- if eq (int .) 0 -}} {{- fail "Kyverno does not support running with 0 replicas. Please provide a non-zero integer value." -}} {{- end -}} + {{- end -}} + {{- end -}} {{- . -}} {{- end -}} diff --git a/charts/kyverno/values.yaml b/charts/kyverno/values.yaml index 37f2093e73..f21468cb1d 100644 --- a/charts/kyverno/values.yaml +++ b/charts/kyverno/values.yaml @@ -450,10 +450,10 @@ features: tuf: # -- Enable tuf enable: false - # -- Tuf root - root: - # -- Tuf mirror - mirror: + # -- (string) Tuf root + root: ~ + # -- (string) Tuf mirror + mirror: ~ # Cleanup cronjobs to prevent internal resources from stacking up in the cluster cleanupJobs: