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
value interpreted as int when intended as string #1694
Comments
Perhaps it would help to give a concrete example, with output edited to focus on issue. Here using the deis/workflow-e2e chart (with relevant use of the following
(yup, two |
Of possible interest, while
Which is to say, there may be another/separate minor issue on displaying the 'true' value used back to the user on |
I beleive that the real cheater-chearter way to do this is to specify type directly. In YAML, you use type tags ( I think you can pass this in set: |
@technosophos Thank you for the creative workaround suggestion! I've tried many variations of it but unfortunately, either my Attempts included:
Do you think it would be encouraged to implement support for parsing quotes such that |
@vdice This issue has been bugging me for a few days now. I ended up escaping the quote like this: |
@longseespace Thank you very much for sending your approach! At first I was mystified by why it wouldn't work for me:
Then I remembered to check on how said value is used in the manifest template:
Sure enough, when I remove the surrounding quotes from the I guess I'm still wondering why, when setting |
@vdice Which helm version are you using? I can't seem to reproduce. I'm using latest helm (v2.1.0) and it's working fine for me |
@longseespace interesting -- I'm on 2.1.0 as well, though noticing the tiller version commit differs; will try to align and test...
update: versions aligned; same behavior as mentioned in #1694 (comment) |
I think a fix for #1707 would actually resolve this issue. (Again note, as mentioned above, that using |
I'm going to close this as a duplicate of #1707, since fixing one will fix both. |
Currently if the commit sha is integer 1647200 the image.tag will be "1.6472e+06" because of the toString function used here - https://github.com/vmware/versatile-data-kit/blob/main/projects/control-service/projects/helm_charts/pipelines-control-service/templates/_helpers.tpl#L76. Helm Issue: helm/helm#1694 Testing Done: helm template Signed-off-by: Miroslav Ivanov miroslavi@vmware.com
Currently if the commit sha is integer 1647200 the image.tag will be "1.6472e+06" because of the toString function used here - https://github.com/vmware/versatile-data-kit/blob/main/projects/control-service/projects/helm_charts/pipelines-control-service/templates/_helpers.tpl#L76. Helm Issue: helm/helm#1694 Testing Done: helm template Signed-off-by: Miroslav Ivanov miroslavi@vmware.com
For people who came here because they have the issue, you can now use the |
When the same release name is used accross namespaces/kubecontexts a bad chart name could be used Fixes helm#1694
Consider a CI pipeline that hands a commit sha between jobs for the purpose of identifying artifacts named with said sha (usually the "short" version as one might get from
git rev-parse --short HEAD
).If said short sha happens to feature only numeric characters, for example,
1194495
, and one attempts to set a corresponding value in a chart that consumes this, say viahelm install chart --set short_sha=1194495
, althoughhelm get values
appears to show it as a string, it actually exists in the pod's/underlying container's environment as1.194495e+06
(meaning, it has understandably been cast to typeint
.)Quoting the value on
--set
doesn't appear to help (helm install chart --set short_sha="1194495"
) which makes sense as there doesn't appear to be support in the parser for this yet; so the value fromhelm get values
is still unquoted.(Setting the value directly in the
values.yaml
file, quoted, does have the desired effect of maintaining the value's... string-ness.)tl;dr So, I suppose my question is, how/where might one mandate type for a value sent in via
--set
, using the example provided above as a use case? (Or, can/should this be done in the chart itself when it consumes the value?)The text was updated successfully, but these errors were encountered: