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
Setting large int64
values in values.yaml
converts them to float64
#11130
Comments
related: #11045 |
This issue has been marked as stale because it has been open for 90 days with no activity. This thread will be automatically closed in 30 days if no further activity occurs. |
it's still actual |
This is still an issue, but there are work-arounds for template authors who cannot guarantee the quoting semantics of input YAML. For string values which are sometimes integers, it seems it's necessary to avoid that standard Go template string casting - using For values with are always integers:
For values which are sometimes integers (Hashes, IDs etc):
Testvalues.yaml
template.yaml
Output
|
This issue has been marked as stale because it has been open for 90 days with no activity. This thread will be automatically closed in 30 days if no further activity occurs. |
unstale |
To everyone who finds this issue, not just the OP: This is a duplicate of #9362. As stated in that issue, it's a problem that stems from kubernetes-sigs/yaml#45. Also as stated, changing this in helm would require a Helm Improvement Proposal because it's not as straightforward as replacing the yaml library. Give the original issue a look and consider helping write up a HIP. The yaml landscape in go has changed since then, though I don't know if compatibility has gotten any better overall. Also, feel free to give feedback on the upstream issue, or contribute a fix if you're able. |
This issue has been marked as stale because it has been open for 90 days with no activity. This thread will be automatically closed in 30 days if no further activity occurs. |
I've already mentioned this here but since the issue is closed I thought it was a good idea to open a new issue.
Output of
helm version
:To reproduce the issue, create the following template.
Using
--set
, everything works as expected:However, setting the value in
values.yaml
:... changes the behavior:
A workaround is multiplying the value with 1 in the template:
This changes the rendered output to the following (note the type still is
float64
):The text was updated successfully, but these errors were encountered: