Refactor parsing of key values
This commit is contained in:
parent
7e256d2c20
commit
4b831c77b2
4 changed files with 13 additions and 10 deletions
|
|
@ -43,10 +43,11 @@ spec:
|
|||
{{- if .Values.defaultBackend.extraArgs }}
|
||||
args:
|
||||
{{- range $key, $value := .Values.defaultBackend.extraArgs }}
|
||||
{{- if $value }}
|
||||
- --{{ $key }}={{ $value }}
|
||||
{{- else }}
|
||||
{{- /* Accept keys without values or with false as value */}}
|
||||
{{- if eq ($value | quote | len) 2 }}
|
||||
- --{{ $key }}
|
||||
{{- else }}
|
||||
- --{{ $key }}={{ $value }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue