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
toToml filter converts int to float #2474
Comments
Which version of Helm/Tiller? |
Sorry, it was with 2.4.2.
…On Fri, May 26, 2017, 18:49 Matt Butcher ***@***.***> wrote:
Which version of Helm/Tiller?
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#2474 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AAINKFjdrGt8yIL9bPx_UuH9kbwQuh7sks5r91bYgaJpZM4NioCL>
.
|
I'm seeing the same issue with 2.5.0 |
From poking around the code a bit, it seems like the YAML parser Helm is using converts YAML to JSON and then parses that. And although the YAML spec distinguishes between integers and floats, the JSON spec doesn't (as far as I can tell), so the conversion process is lossy. By the time the TOML encoder sees it, it's already a float, so it adds a decimal point to the output. For reference, the conversion to JSON is happening here: https://github.com/ghodss/yaml/blob/73d445a93680fa1a78ae23a5839bad48f32ba1ee/yaml.go#L98 |
related issue: #1707 |
Issues go stale after 90d of inactivity. Prevent issues from auto-closing with an If this issue is safe to close now please do so with Send feedback to sig-testing, kubernetes/test-infra and/or |
Stale issues rot after 30d of inactivity. If this issue is safe to close now please do so with Send feedback to sig-testing, kubernetes/test-infra and/or fejta. |
Rotten issues close after 30d of inactivity. Send feedback to sig-testing, kubernetes/test-infra and/or fejta. |
/reopen |
Hey @johanfleury, if you could please open a new issue with the version of Helm and Kubernetes you are using as well as a demonstration/reproduction of the issue, that would be great. This issue was opened over two years ago and was likely fixed in #6010, so if you could try and reproduce using the canaries, that'd be great. Thanks! |
reopened as #12987 |
Given the following data structure in values.yaml:
And this in my configmap template:
I get this:
Even casting the variable via
bar: !!int 9
doesn't change the behavior, can't reproduce using the toJson filter either.The text was updated successfully, but these errors were encountered: