Created
May 10, 2023 09:47
-
-
Save mitzen/893d5d4eb46131d5b5ecc3834027deac to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| {{- $default := dict "boolProp" true "stringProp" "Override me" }} | |
| {{- $explicit := dict "boolProp" false "stringProp" "String value is overriden, but bool value is not!" }} | |
| $default: | |
| {{- $default | toYaml | nindent 2 }} | |
| $explicit: | |
| {{- $explicit | toYaml | nindent 2 }} | |
| # Here is the bug: `boolProp` can't be overriden with a `false` value by | |
| # `merge`. `boolProp` should be false here (the first argument to `merge` has | |
| # precedence, according to helm docs) | |
| merge $explicit $default: | |
| {{- merge $explicit $default | toYaml | nindent 2 }} | |
| # `mergeOverwrite` also cannot deal with bools | |
| mergeOverwrite $default $explicit: | |
| {{- mergeOverwrite $default $explicit | toYaml | nindent 2 }} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment