Open Arabus opened 4 years ago
Same issue with v.139.9 due to (probably) auto-wrapping of booleans and integers into quotes when using --state-values-set. Makes the "condition" feature unusable from CLI.
I assume the problem happens here https://github.com/roboll/helmfile/blob/77e6268bcb38ca68deb75f1bc8b4ca258fb8473d/main.go#L715 Because this is a StringSlice all of its members are automagically converted to strings. It might be good to add a type converter here that converts the value part to its corresponding type unless it was quoted. We only need a bool converter for this ticket but I guess one for numbers might also not hurt. Alternativley autoconvert strings to the type required by the state-value
@Arabus Hey! Thanks for reporting. Implementing auto-converters would definitely help.
FYI, I thought Helm had the similar mechanisms for typing values passed via --set
(and --set-string
in case you want to disable the autoconverion so that it forces the value to be a string). Helm's implementation can be a good reference when implementing this in Helmfile.
When trying to enable/disable a release from my helmfile via the CLI with
--state-values-set foo.enabled=true
I getIs there a way I'm forgetting or is this not possible at the moment?
Relevant Metadata
Helmfile version
Helm version & Plugins
go version
mac os version