Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

helm install/upgrade does not support commas in set flag #2952

Closed
jschrantz opened this issue Sep 19, 2017 · 5 comments
Closed

helm install/upgrade does not support commas in set flag #2952

jschrantz opened this issue Sep 19, 2017 · 5 comments

Comments

@jschrantz
Copy link

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.

@bacongobbler
Copy link
Member

Works fine for me with \,.

><> helm template chart/draftd/ --set image.tag="hello\, world" | grep hello
        image: "microsoft/draft:hello, world"

@bacongobbler
Copy link
Member

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!

@jschrantz
Copy link
Author

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.

@WarpRat
Copy link

WarpRat commented Jan 15, 2020

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

@cawoodm
Copy link

cawoodm commented Mar 5, 2022

Why does helm have a problem with commas in a string??

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants