fix the Helm trick that we use to differentiate between 0 and an empty value

Signed-off-by: Tim Ramlot <42113979+inteon@users.noreply.github.com>
This commit is contained in:
Tim Ramlot 2024-02-07 12:54:25 +01:00
parent 8b44dd2b20
commit 2b14b3234d
No known key found for this signature in database
GPG Key ID: 47428728E0C2878D
3 changed files with 6 additions and 6 deletions

View File

@ -16,7 +16,7 @@ metadata:
{{- end }}
spec:
replicas: {{ .Values.cainjector.replicaCount }}
{{- if ne (quote .Values.global.revisionHistoryLimit) (quote "") }}
{{- if not (has (quote .Values.global.revisionHistoryLimit) (list "" (quote ""))) }}
revisionHistoryLimit: {{ .Values.global.revisionHistoryLimit }}
{{- end }}
selector:
@ -61,7 +61,7 @@ spec:
image: "{{ template "image" (tuple .Values.cainjector.image $.Chart.AppVersion) }}"
imagePullPolicy: {{ .Values.cainjector.image.pullPolicy }}
args:
{{- if ne (quote .Values.global.logLevel) (quote "") }}
{{- if not (has (quote .Values.global.logLevel) (list "" (quote ""))) }}
- --v={{ .Values.global.logLevel }}
{{- end }}
{{- with .Values.global.leaderElection }}

View File

@ -15,7 +15,7 @@ metadata:
{{- end }}
spec:
replicas: {{ .Values.replicaCount }}
{{- if ne (quote .Values.global.revisionHistoryLimit) (quote "") }}
{{- if not (has (quote .Values.global.revisionHistoryLimit) (list "" (quote ""))) }}
revisionHistoryLimit: {{ .Values.global.revisionHistoryLimit }}
{{- end }}
selector:
@ -79,7 +79,7 @@ spec:
image: "{{ template "image" (tuple .Values.image $.Chart.AppVersion) }}"
imagePullPolicy: {{ .Values.image.pullPolicy }}
args:
{{- if ne (quote .Values.global.logLevel) (quote "") }}
{{- if not (has (quote .Values.global.logLevel) (list "" (quote ""))) }}
- --v={{ .Values.global.logLevel }}
{{- end }}
{{- if .Values.config }}

View File

@ -15,7 +15,7 @@ metadata:
{{- end }}
spec:
replicas: {{ .Values.webhook.replicaCount }}
{{- if ne (quote .Values.global.revisionHistoryLimit) (quote "") }}
{{- if not (has (quote .Values.global.revisionHistoryLimit) (list "" (quote ""))) }}
revisionHistoryLimit: {{ .Values.global.revisionHistoryLimit }}
{{- end }}
selector:
@ -66,7 +66,7 @@ spec:
image: "{{ template "image" (tuple .Values.webhook.image $.Chart.AppVersion) }}"
imagePullPolicy: {{ .Values.webhook.image.pullPolicy }}
args:
{{- if ne (quote .Values.global.logLevel) (quote "") }}
{{- if not (has (quote .Values.global.logLevel) (list "" (quote ""))) }}
- --v={{ .Values.global.logLevel }}
{{- end }}
{{- if .Values.webhook.config }}