apiVersion: v1
kind: ConfigMap
metadata:
name: app-configmap
data:
{{- range $key, $value := .Values.envVars }}
{{ $key }}: {{ $value | quote }}
{{- end }}
Running
helm upgrade my-app --install --set envVars.CREDS='{"key":"val"}'
with the above configmap
results in a configmap as follows:
CREDS = ["key":"val"]
So instead of a JSON, it's an array.
What do I need to configure to pass it as a JSON?