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

[BUG] default function treats boolean false as not defined, and applies default #7545

Closed
YTGhost opened this issue Jun 17, 2024 · 0 comments · Fixed by #7547
Closed

[BUG] default function treats boolean false as not defined, and applies default #7545

YTGhost opened this issue Jun 17, 2024 · 0 comments · Fixed by #7547
Assignees
Labels
kind/bug Something isn't working
Milestone

Comments

@YTGhost
Copy link
Contributor

YTGhost commented Jun 17, 2024

Describe the bug
As mentioned in title, default helm function works weird and threats false as undefined and applies default value when I expect false. The Helm community has similar discussions as well: helm/helm#12080

So for the deployment.yaml in the Helm template, the template settings for the following two parameters will cause the value to always be true.

- "--apps={{- default "true" .Values.controllers.apps.enabled }}"
- "--workloads={{- default "true" .Values.controllers.workloads.enabled }}"

To Reproduce
When installing KubeBlocks charts using helm install and setting parameter values such as --set controllers.workloads.enabled=false, the value will not be set to false.

Expected behavior
For the two parameters mentioned in the description, users should be able to set the desired boolean values, rather than them always being true.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants