You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Today (v2.1.0) if you specify --set a second time to install it is ignored.
That is surprising and possibly would lead to a bad situation like a
default admin password instead of the one the user thought they were
setting.
However, I think the solution is to support multiple --set options,
as it is nicer for scripting, and possibly interactive use as well.
It allows for multiple options to be built up more easily in a script (no checking if it's the first option to avoid prepending a comma).
It avoids long lines
It scans better to see where each option is and what the value is
I realise that there is a yaml file for specifying values in an even nicer way,
but if you are writing a bash script that generates some of the values
(the image tag, random passwords for a test), you don't want to try
and serialize valid yaml, it's easier to build a command line.
It would even pave the way to allow commas in values with some other
option to turn on that backwards-incompatible behaviour.
Yep, I'm aware, thanks. However I don't think that comma-separated is ideal, and would like the option of using --set multiple times, or at the very least getting an error if I try.
Ah I see. My first attempt at setting multiple values via the --set command was --set k1=v1 --set k2=v2 as it is the way I've interacted with CLI's in the past. I had to look it up in the docs to learn how to do it the helm way, so I understand why you would want this, and like you say this would allow commas in values.
In that case, I think the helm team could:
Allow multiple --set in the next minor (2.x)
Deprecate the comma separation method in the next minor (2.x)
Remove the comma separation method in the next major (3.0)
I believe we now support multiple -f flags, so it does make sense to support multiple --set flags. I'm going to mark this as a "starter" because it's really just a matter of modifying cmd/helm/install.go and cmd/helm/upgrade.go to change the flag behavior.
Update: However, we probably won't deprecate the comma-separated version for a while yet. We could definitely discuss removing that feature in Helm 3.x.
Reacted by Simon Holloway, Ferran Rodenas and Christopher Hanson
About the comma-separated key value pairs, having the option to turn comma-separation off would be nice, as we need to specify strings with multiple commas in them (eg. mongo connection strings), and escaping these from within shell scripts/CD tooling/environment variables can be a pain.
Activity
syhol commentedon Dec 23, 2016
You can comma seperate the values
--set foo=bar,qux=bazWould build
it's also in the help text:
james-w commentedon Dec 23, 2016
Yep, I'm aware, thanks. However I don't think that comma-separated is ideal, and would like the option of using
--setmultiple times, or at the very least getting an error if I try.syhol commentedon Dec 23, 2016
Ah I see. My first attempt at setting multiple values via the --set command was
--set k1=v1 --set k2=v2as it is the way I've interacted with CLI's in the past. I had to look it up in the docs to learn how to do it the helm way, so I understand why you would want this, and like you say this would allow commas in values.In that case, I think the helm team could:
technosophos commentedon Dec 23, 2016
I believe we now support multiple
-fflags, so it does make sense to support multiple--setflags. I'm going to mark this as a "starter" because it's really just a matter of modifyingcmd/helm/install.goandcmd/helm/upgrade.goto change the flag behavior.Update: However, we probably won't deprecate the comma-separated version for a while yet. We could definitely discuss removing that feature in Helm 3.x.
james-w commentedon Jan 13, 2017
Great, thanks!
mcandre commentedon Mar 8, 2017
The current design causes #1556
dsample commentedon Jan 24, 2018
About the comma-separated key value pairs, having the option to turn comma-separation off would be nice, as we need to specify strings with multiple commas in them (eg. mongo connection strings), and escaping these from within shell scripts/CD tooling/environment variables can be a pain.
feat: Allow overriding chart via flag (helm#1751)