Improve parsing of helm global.logLevel (only accept integers 0-5, inclusive)

Signed-off-by: ChrisDevo <chris.devine@berkeley.edu>
This commit is contained in:
ChrisDevo 2023-03-11 14:45:45 -08:00 committed by Tim Ramlot
parent 65e78f3cef
commit 519197b511
No known key found for this signature in database
GPG Key ID: 47428728E0C2878D
3 changed files with 3 additions and 3 deletions

View File

@ -58,7 +58,7 @@ spec:
image: "{{ template "image" (tuple .Values.cainjector.image $.Chart.AppVersion) }}"
imagePullPolicy: {{ .Values.cainjector.image.pullPolicy }}
args:
{{- if .Values.global.logLevel }}
{{- if eq (.Values.global.logLevel | toString) "0" "1" "2" "3" "4" "5" }}
- --v={{ .Values.global.logLevel }}
{{- end }}
{{- with .Values.global.leaderElection }}

View File

@ -76,7 +76,7 @@ spec:
image: "{{ template "image" (tuple .Values.image $.Chart.AppVersion) }}"
imagePullPolicy: {{ .Values.image.pullPolicy }}
args:
{{- if .Values.global.logLevel }}
{{- if eq (.Values.global.logLevel | toString) "0" "1" "2" "3" "4" "5" }}
- --v={{ .Values.global.logLevel }}
{{- end }}
{{- if .Values.config }}

View File

@ -63,7 +63,7 @@ spec:
image: "{{ template "image" (tuple .Values.webhook.image $.Chart.AppVersion) }}"
imagePullPolicy: {{ .Values.webhook.image.pullPolicy }}
args:
{{- if .Values.global.logLevel }}
{{- if eq (.Values.global.logLevel | toString) "0" "1" "2" "3" "4" "5" }}
- --v={{ .Values.global.logLevel }}
{{- end }}
{{- if .Values.webhook.config }}