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

helm: add workaround for Helm int/float snafu. #250

Merged

Conversation

klihub
Copy link
Collaborator

@klihub klihub commented Jan 29, 2024

Helm is struggling with a regression where integer values get converted to float64 and therefore fail to get later properly injected into templates. For us this hits our integer [nri.]pluginIndex values.

Add a workaround to first force plugin indices to integers before injecting them through templates.
See helm/helm@44a81f63 for more details.

The other alternative considered was this in values.schema.json:

                "pluginIndex": {
                    "type": "string",
                    "pattern": "^[0-9][0-9]$"
                }

Since indices are integers and the above alternative would have also required us to always quote indices in values.yaml, this simpler choice of representing integer indices as integer values was chosen.

Helm is struggling with a regression where integer
values get converted to float64 and therefore fail
to get later properly injected into templates. For
us this hits our integer [nri.]pluginIndex values.

Add a workaround to first force plugin indices to
integers before injecting them through templates.
See helm/helm@44a81f63
for more details.

Signed-off-by: Krisztian Litkey <[email protected]>
Copy link
Collaborator

@askervin askervin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM and solves the problem. Thank you, @klihub!

@klihub klihub requested a review from fmuyassarov January 29, 2024 14:23
Copy link
Collaborator

@fmuyassarov fmuyassarov left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@fmuyassarov fmuyassarov merged commit 9011f56 into containers:main Jan 29, 2024
3 checks passed
@klihub klihub deleted the fixes/helm-force-integer-plugin-indices branch January 30, 2024 08:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants