From 49f65a0aa2273d048584343d3abaa85d3918e191 Mon Sep 17 00:00:00 2001 From: Damiano Albani Date: Tue, 31 Aug 2021 23:16:13 +0200 Subject: [PATCH] Expand list of variable types supported for ConfigMap generation --- charts/postgres-operator/templates/_helpers.tpl | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/charts/postgres-operator/templates/_helpers.tpl b/charts/postgres-operator/templates/_helpers.tpl index c958a99a6..ee3a8dd22 100644 --- a/charts/postgres-operator/templates/_helpers.tpl +++ b/charts/postgres-operator/templates/_helpers.tpl @@ -57,18 +57,16 @@ Flatten nested config options when ConfigMap is used as ConfigTarget */}} {{- define "flattenValuesForConfigMap" }} {{- range $key, $value := . }} - {{- if or (kindIs "string" $value) (kindIs "int" $value) }} -{{ $key }}: {{ $value | quote }} - {{- end }} {{- if kindIs "slice" $value }} {{ $key }}: {{ join "," $value | quote }} - {{- end }} - {{- if kindIs "map" $value }} + {{- else if kindIs "map" $value }} {{- $list := list }} {{- range $subKey, $subValue := $value }} {{- $list = append $list (printf "%s:%s" $subKey $subValue) }} {{ $key }}: {{ join "," $list | quote }} {{- end }} + {{- else }} +{{ $key }}: {{ $value | quote }} {{- end }} {{- end }} {{- end }}