1
0
Fork 0
mirror of https://github.com/kyverno/kyverno.git synced 2024-12-14 11:57:48 +00:00

(cherry-pick) Fix Helm chart to not error when replicas defined (#9066) (#9073)

Fixes #8941

Cherry pick from main PR didn't work

Signed-off-by: Trey Dockendorf <tdockendorf@osc.edu>
This commit is contained in:
treydock 2023-12-04 09:09:28 -05:00 committed by GitHub
parent c146c5731c
commit 52526f8425
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 14 additions and 3 deletions

View file

@ -75,6 +75,8 @@ annotations:
description: missing image pull policy missing in a couple of deployments
- kind: added
description: added TUF flags for custom sigstore deployments
- kind: fixed
description: Fix Helm chart to not error when replicas defined
dependencies:
- name: grafana
version: "0.0.0"

View file

@ -0,0 +1,11 @@
admissionController:
replicas: 1
cleanupController:
replicas: 1
reportsController:
replicas: 1
backgroundController:
replicas: 1

View file

@ -1,12 +1,10 @@
{{/* vim: set filetype=mustache: */}}
{{- define "kyverno.deployment.replicas" -}}
{{- if not (eq . nil) -}}
{{- if not (kindIs "string" .) -}}
{{- if and (not (kindIs "invalid" .)) (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 -}}