What happened?
Since helm v4, when you define a map in values.yaml of your chart then override it in a values.yaml with a map containing keys with null value, theses keys/values are not added to the map.
What did you expect to happen?
Keys should be present in the resulting map with null values, as in helm v3.
How can we reproduce it (as minimally and precisely as possible)?
With the following chart
chart/Chart.yaml:
chart/templates/foo.yaml:
data: {{.Values.data | quote}}
chart/values.yaml:
values.yaml:
With helm v4
$ helm version
version.BuildInfo{Version:"v4.0.2", GitCommit:"94659f25033af6eb43fc186c24e6c07b1091800b", GitTreeState:"clean", GoVersion:"go1.25.4", KubeClientVersion:"v1.34"}
$ helm template chart --values values.yaml
---
# Source: foo/templates/foo.yaml
data: "map[foo:bar]"
With helm v3:
$ helm version
version.BuildInfo{Version:"v3.19.3", GitCommit:"0707f566a3f4ced24009ef14d67fe0ce69db4be9", GitTreeState:"clean", GoVersion:"go1.24.10"}
$ helm template chart --values values.yaml
---
# Source: chart/templates/foo.yaml
data: "map[baz:<nil> foo:bar]"
With an edited chart/values.yaml file
chart/values.yaml:
With helm v4
$ helm version
version.BuildInfo{Version:"v4.0.2", GitCommit:"94659f25033af6eb43fc186c24e6c07b1091800b", GitTreeState:"clean", GoVersion:"go1.25.4", KubeClientVersion:"v1.34"}
$ helm template chart --values values.yaml
---
# Source: chart/templates/foo.yaml
data: "map[baz:<nil> foo:bar]"
Helm version
Details
$ helm version
version.BuildInfo{Version:"v4.0.2", GitCommit:"94659f25033af6eb43fc186c24e6c07b1091800b", GitTreeState:"clean", GoVersion:"go1.25.4", KubeClientVersion:"v1.34"}
Kubernetes version
Details
What happened?
Since helm v4, when you define a map in
values.yamlof your chart then override it in avalues.yamlwith a map containing keys withnullvalue, theses keys/values are not added to the map.What did you expect to happen?
Keys should be present in the resulting map with null values, as in helm v3.
How can we reproduce it (as minimally and precisely as possible)?
With the following chart
chart/Chart.yaml:
chart/templates/foo.yaml:
chart/values.yaml:
values.yaml:
With helm v4
$ helm version version.BuildInfo{Version:"v4.0.2", GitCommit:"94659f25033af6eb43fc186c24e6c07b1091800b", GitTreeState:"clean", GoVersion:"go1.25.4", KubeClientVersion:"v1.34"} $ helm template chart --values values.yaml --- # Source: foo/templates/foo.yaml data: "map[foo:bar]"With helm v3:
$ helm version version.BuildInfo{Version:"v3.19.3", GitCommit:"0707f566a3f4ced24009ef14d67fe0ce69db4be9", GitTreeState:"clean", GoVersion:"go1.24.10"} $ helm template chart --values values.yaml --- # Source: chart/templates/foo.yaml data: "map[baz:<nil> foo:bar]"With an edited chart/values.yaml file
chart/values.yaml:
With helm v4
$ helm version version.BuildInfo{Version:"v4.0.2", GitCommit:"94659f25033af6eb43fc186c24e6c07b1091800b", GitTreeState:"clean", GoVersion:"go1.25.4", KubeClientVersion:"v1.34"} $ helm template chart --values values.yaml --- # Source: chart/templates/foo.yaml data: "map[baz:<nil> foo:bar]"Helm version
Details
Kubernetes version
Details