Skip to content

Commit

Permalink
fix(helm): skip deployment replicas validation in non-int value (kyve…
Browse files Browse the repository at this point in the history
…rno#8539)

* fix(helm): skip deployment replicas validation in non-int value

Signed-off-by: Erik Godding Boye <[email protected]>

* fix

Signed-off-by: Charles-Edouard Brétéché <[email protected]>

---------

Signed-off-by: Erik Godding Boye <[email protected]>
Signed-off-by: Charles-Edouard Brétéché <[email protected]>
Co-authored-by: Charles-Edouard Brétéché <[email protected]>
  • Loading branch information
erikgb and eddycharly authored Sep 27, 2023
1 parent 20655f5 commit 8d2b68d
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 5 deletions.
6 changes: 5 additions & 1 deletion charts/kyverno/templates/_helpers/_deployment.tpl
Original file line number Diff line number Diff line change
@@ -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 -}}
8 changes: 4 additions & 4 deletions charts/kyverno/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down

0 comments on commit 8d2b68d

Please sign in to comment.