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
argument and yaml parsing type errors #3005
Comments
To give others some background on why the chart uses a float-point value instead of an int, it's due to some issues with the --set parser with ints being converted to scientific notation in some cases as seen in #1707. We've attempted a multitude of --set attempts over slack with @arthurlm44 yesterday afternoon:
None of the above worked. Regardless of the argument whether replica count should be an integer or not, we should find a way to parse floating point values and document it. The ugly workaround is to use a literal string for now.
It's funny to think how only 2 and a third pods would be deployed, though. 😄 |
I have a related issue without using set, Helm v2.6.2. Thanks for the hints here to get a workaround. Does not work:
templates/test.yaml
Output:
Does work:
templates/test.yaml
|
This just occurred to me out of the blue and I thought I'd at least capture it here. Would something like this work:
…? |
Assuming https://github.com/ghodss/yaml supports it, yes. Most parsers don't support every part of the YAML spec. |
Issues go stale after 90d 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. |
Still facing this issue, helm 2.7.2 - workaround using float works |
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. |
same as @hobti01 issue still occurs -
|
Out of curiosity, could you try |
To clarify the workaround from @so0k, if doing something like |
I got around this by piping the variables to For instance, to check whether my hpa's max number of replicas was less than or equal to the number of credentials I had, I did this: {{ le (.Values.hpa.maxReplicas | int64) (len .Values.app.credentials | int64) }} This workaround isn't pretty, but it works for me. |
given that there hasn't been any activity in the last 3 years to address this since it was first opened, I'm going to close this as community members have found workarounds to the issue, and that seems to solve the problem. |
Since upgrading to helm 2.6.1, from 2.5.1 I've been encountering this issue:
The helm command is:
and the chart starts with:
This worked fine in 2.5.1 but is broken in 2.6.1
I've tried from file via
-f
flag but get the same type error.Strings are parsed fine, but integers (which used to be automatically converted to floats, which in itself was a bug) are no longer coming in as either integers or floats and vice-versa.
I've attempted to pass ints, and floats and have attempted int and float comparison to no avail.
The text was updated successfully, but these errors were encountered: