The helm cli does not seem to support a value containing a comma in the set flag for install or upgrade.
$ helm install --set greeting='hello, world' .
Error: failed parsing --set data: key " world" has no value
It seems that the parser is trying to look for additional keys if it finds a comma in the value. I've tried several quoting or escaping strategies and all seem to have the same issue.
$ helm install --set greeting="hello, world" .
Error: failed parsing --set data: key " world" has no value
$ helm install --set "greeting=hello, world" .
Error: failed parsing --set data: key " world" has no value
$ helm install --set greeting=hello,\ world .
Error: failed parsing --set data: key " world" has no value
The workaround is to use a value file instead of the set flag, but for my use case of passing config files through to configmaps it is easier and cleaner to manage the config files separately and cat them into a set flag than to either store them in a yaml wrapper or construct that wrapper on the fly.
Works fine for me with \,
.
><> helm template chart/draftd/ --set image.tag="hello\, world" | grep hello
image: "microsoft/draft:hello, world"
This is noted in the documentation under https://docs.helm.sh/using_helm/#the-format-and-limitations-of-set, so I'm closing this as resolved. Please re-open if that fix doesn't work for you. Thanks!
Hmm, I could have sworn that I tried escaping the comma, but I just checked back to version 2.4.0 and it worked on all of them. I clearly was mistaken, my bad.
If anyone else comes across this via Google as I did, the updated link to the docs for --set
in Helm 2 is: https://v2.helm.sh/docs/using_helm/#the-format-and-limitations-of-set
Most helpful comment
Works fine for me with
\,
.