-
Notifications
You must be signed in to change notification settings - Fork 7.3k
Closed
Labels
Description
Setup
Here is my helm chart (just the relevant part to this issue)
values.yaml:
name: failed
MyValue: 0
templates/config.yaml:
apiVersion: v1
kind: ConfigMap
metadata:
name: {{ .Values.name }}
data:
file.conf: |+
{{ .Values.MyValue | default 10 }}
Expected behaviour
Running helm upgrade --install ...
I expect to have a ConfigMap that contains the value "0".
Actual behaviour
The created ConfigMap contains "10" (the default).
$ kubectl describe cm failed
Name: failed
Namespace: default
Labels: <none>
Annotations: <none>
Data
====
file.conf:
----
10
Events: <none>
More fun:
This behaviour is not visible when :
- there is no default. Changing this line
{{ .Values.MyValue | default 10 }}
to this{{ .Values.MyValue }}
- the value is different than Zero (0). Changing this line
MyValue: 0
to thisMyValue: 7
- the value is zero by quoted "0" (string not int). Changing this line
MyValue: 0
to thisMyValue: "0"
himani93, amyXia1994, acolliot, bmaupin, aljohn0422 and 17 more