helm 3.0.0-rc.3 --set-string does not work with booleans

Created on 12 Nov 2019  路  1Comment  路  Source: helm/helm

It seems that --set-string does not work with boolean as expected under helm 3.0.0-rc.3

According to https://helm.sh/docs/using_helm/#the-format-and-limitations-of-set,

--set-string foo=true results in a string value of "true".

Running the following, I would expect it to quote the "true", and deploy the nginx-ingress on the nodes matching the selector.

helm upgrade --install nginx-ingress stable/nginx-ingress --namespace nginx-ingress --set-string controller.nodeSelector."boolean\.dotted/slashed-dashed"=true

However, I get the following error:

Release "nginx-ingress" does not exist. Installing it now.
Error: Deployment in version "v1" cannot be handled as a Deployment: v1.Deployment.Spec: v1.DeploymentSpec.Template: v1.PodTemplateSpec.Spec: v1.PodSpec.NodeSelector: ReadString: expects " or n, but found t, error found in #10 byte of ...|-dashed":true},"serv|..., bigger context ...|,"nodeSelector":{"boolean.dotted/slashed-dashed":true},"serviceAccountName":"nginx-ingress-nginx-|...

It seems to be a regression of #2848, the code merged in #4142 has disappeared

Output of helm version:
```helm version
version.BuildInfo{Version:"v3.0.0-rc.3", GitCommit:"2ed206799b451830c68bff30af2a52879b8b937a", GitTreeState:"clean", GoVersion:"go1.13.4"}

Output of `kubectl version`:

Client Version: version.Info{Major:"1", Minor:"16", GitVersion:"v1.16.2", GitCommit:"c97fe5036ef3df2967d086711e6c0c405941e14b", GitTreeState:"clean", BuildDate:"2019-10-15T19:18:23Z", GoVersion:"go1.12.10", Compiler:"gc", Platform:"linux/amd64"}
Server Version: version.Info{Major:"1", Minor:"16", GitVersion:"v1.16.2", GitCommit:"c97fe5036ef3df2967d086711e6c0c405941e14b", GitTreeState:"clean", BuildDate:"2019-10-15T19:09:08Z", GoVersion:"go1.12.10", Compiler:"gc", Platform:"linux/amd64"}
```
Cloud Provider/Platform (AKS, GKE, Minikube etc.):
Bare metal nodes deployed with RKE

bug v3.x

Most helpful comment

it's likely that #4142 was merged after Helm 3 forked from the Helm 2 code base. Thanks for identifying the PR. Will take a look and see if we can cherry-pick that into the Helm 3 branch this morning.

>All comments

it's likely that #4142 was merged after Helm 3 forked from the Helm 2 code base. Thanks for identifying the PR. Will take a look and see if we can cherry-pick that into the Helm 3 branch this morning.

Was this page helpful?
0 / 5 - 0 ratings