Skip to content

Commit 8d44f92

Browse files
authored
Merge pull request #169 from camjay/fix/config-tostring-quote
fix(config): handle numeric, boolean, and falsy env var values
2 parents 048a5d9 + a1bd543 commit 8d44f92

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

charts/portkey-gateway/templates/gateway/config.yaml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,11 @@ metadata:
66
name: {{ include "portkeyenterprise.fullname" . }}
77
labels:
88
{{- include "gateway.labels" . }}
9-
data:
9+
data:
1010
{{- range $key, $val := .Values.environment.data }}
11-
{{ $key }}: {{- if $val }} {{ $val | b64enc }} {{- else }} "" {{- end }}
11+
{{ $key }}: {{- if not (kindIs "invalid" $val) }} {{ $val | toString | b64enc }} {{- else }} "" {{- end }}
1212
{{- end -}}
13-
{{- else -}}
13+
{{- else -}}
1414
apiVersion: v1
1515
kind: ConfigMap
1616
metadata:
@@ -19,7 +19,7 @@ metadata:
1919
{{- include "gateway.labels" . }}
2020
data:
2121
{{- range $key, $val := .Values.environment.data }}
22-
{{ $key }}: {{ $val }}
22+
{{ $key }}: {{- if not (kindIs "invalid" $val) }} {{ $val | toString | quote }} {{- else }} "" {{- end }}
2323
{{- end -}}
2424
{{- end -}}
2525
{{- end -}}

0 commit comments

Comments
 (0)