Commit 2fce204
authored
fix: ensure boolean flags are only passed when their corresponding Helm chart value is true (#467)
Issue: aws-controllers-k8s/community#1893
In this commit, we address the issue of passing boolean flags in a more
solid way.
We've observed an odd obehaviour when a user attempts to
disabled a feature (e.g `leaderElection/developmentLogging`), which
causes the flag to be enabled instead.
The main root cause of this issue was, using environment vairables with
the `pflag` library, combined with the fact that `spf13/cobra` library
conciders passed boolean flags with no values (no `=<value>`) as `true`
The fix consists of
1. Avoid using environment variables for boolean flags.
2. Updating the helm template to only pass boolean flags when their
respctive helm chat values are present.
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.1 parent a2e3c2e commit 2fce204
1 file changed
+4
-6
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
48 | 48 | | |
49 | 49 | | |
50 | 50 | | |
| 51 | + | |
51 | 52 | | |
52 | | - | |
| 53 | + | |
53 | 54 | | |
54 | 55 | | |
55 | 56 | | |
| |||
58 | 59 | | |
59 | 60 | | |
60 | 61 | | |
| 62 | + | |
61 | 63 | | |
62 | | - | |
63 | 64 | | |
64 | 65 | | |
| 66 | + | |
65 | 67 | | |
66 | 68 | | |
67 | 69 | | |
| |||
91 | 93 | | |
92 | 94 | | |
93 | 95 | | |
94 | | - | |
95 | | - | |
96 | 96 | | |
97 | 97 | | |
98 | | - | |
99 | | - | |
100 | 98 | | |
101 | 99 | | |
102 | 100 | | |
| |||
0 commit comments