Skip to content
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

Trailing zeros get truncated from tag minor versions that are multiples of 10 #106

Closed
1 of 3 tasks
diverdane opened this issue Nov 9, 2020 · 0 comments · Fixed by #107
Closed
1 of 3 tasks

Trailing zeros get truncated from tag minor versions that are multiples of 10 #106

diverdane opened this issue Nov 9, 2020 · 0 comments · Fixed by #107

Comments

@diverdane
Copy link
Contributor

diverdane commented Nov 9, 2020

Summary

If all of the following are true for an image tag Helm chart value:

  • The tag value is set in a custom values.yaml file
  • The tag is a numeric semantic version (i.e. no surrounding quotes are used)
  • The tag is of the form <major_version>.<minor_version>
  • The minor number is a multiple of 10

Then the trailing zeros of the minor version get truncated when the tag gets translated to
a Kubernetes manifest.

For example, a tag of 1.10 gets truncated to 1.1. This happens because the .10 in 1.10 is treated
as a decimal fraction.

This issue seems unavoidable if we allow tag values to be numeric.

It would be better to avoid this issue by only allowing string values (i.e. surrounding quotes should be required).

Steps to Reproduce

Steps to reproduce the behavior:

  1. Copy values.yaml to custom_values.yaml
  2. Modify any of the tag values in custom_values.yaml to 1.10
  3. Run helm template ... or helm install --dry-run... with the -f custom_values.yaml option
  4. Look at the rendered Kubernetes manifest, and you will see the 1.10 value trucated
    to 1.1.

Expected Results

Either:

  • A numeric tag value with minor version that is a multiple of 10,
    e.g. 1.10 should not get truncated, OR....
  • Numeric tag values should not be allowed.

Actual Results (including error logs, if applicable)

A tag value of 1.10 was truncated to 1.1 upon translation
to Kubernetes manifest.

Reproducible

  • Always
  • Sometimes
  • Non-Reproducible

Version/Tag number

What version of the product are you running? Any version info that you can share is helpful.
For example, you might give the version from Docker logs, the Docker tag, a specific download URL,
the output of the /info route, etc.

Environment setup

Can you describe the environment in which this product is running? Is it running on a VM / in a container / in a cloud?
Which cloud provider? Which container orchestrator (including version)?
The more info you can share about your runtime environment, the better we may be able to reproduce the issue.

Additional Information

Add any other context about the problem here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

Successfully merging a pull request may close this issue.

1 participant