I'm trying to pass a JSON array into a Helm Chart. The chart's source code is here.
I'm passing the value like this:
helm upgrade --install ingress-nginx ingress-nginx/ingress-nginx \
--repo https://kubernetes.github.io/ingress-nginx \
--set controller.configAnnotations='{"mykey":"myval"}'
I've tried various forms of escaping the "
and the curly brackets as recommended in several other SO answers but I have not been able to find the combination which makes it work. My shell is Bash.
I always end up with this error:
coalesce.go:220: warning: cannot overwrite table with non table
for ingress-nginx.controller.configAnnotations (map[])
Error: UPGRADE FAILED: YAML parse error on ingress-nginx/templates/controller-configmap.yaml:
error unmarshaling JSON: while decoding JSON: json:
cannot unmarshal string into Go struct field .metadata.annotations of type map[string]string
Note that I'm using the Helm Chart for Kubernetes NGINX Controller from the Kubernetes project, not the equivalent from NGINX Inc. Not that I think it makes any difference to the question.