Skip to content

Commit 9e291d0

Browse files
authored
Expand list of variable types supported for ConfigMap generation (zalando#1603)
1 parent ba6c3c3 commit 9e291d0

File tree

1 file changed

+3
-5
lines changed

1 file changed

+3
-5
lines changed

charts/postgres-operator/templates/_helpers.tpl

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -57,18 +57,16 @@ Flatten nested config options when ConfigMap is used as ConfigTarget
5757
*/}}
5858
{{- define "flattenValuesForConfigMap" }}
5959
{{- range $key, $value := . }}
60-
{{- if or (kindIs "string" $value) (kindIs "int" $value) }}
61-
{{ $key }}: {{ $value | quote }}
62-
{{- end }}
6360
{{- if kindIs "slice" $value }}
6461
{{ $key }}: {{ join "," $value | quote }}
65-
{{- end }}
66-
{{- if kindIs "map" $value }}
62+
{{- else if kindIs "map" $value }}
6763
{{- $list := list }}
6864
{{- range $subKey, $subValue := $value }}
6965
{{- $list = append $list (printf "%s:%s" $subKey $subValue) }}
7066
{{ $key }}: {{ join "," $list | quote }}
7167
{{- end }}
68+
{{- else }}
69+
{{ $key }}: {{ $value | quote }}
7270
{{- end }}
7371
{{- end }}
7472
{{- end }}

0 commit comments

Comments
 (0)