-
Notifications
You must be signed in to change notification settings - Fork 7.5k
Regression in map values merging in helm v4 #31643
Copy link
Copy link
Closed
Labels
bugCategorizes issue or PR as related to a bug.Categorizes issue or PR as related to a bug.
Description
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:
name: foo
version: 0.0.1
chart/templates/foo.yaml:
data: {{.Values.data | quote}}
chart/values.yaml:
data: {}
values.yaml:
data:
foo: bar
baz: ~
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:
data: ~
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
$ kubectl version
N/AReactions are currently unavailable
Metadata
Metadata
Assignees
Labels
bugCategorizes issue or PR as related to a bug.Categorizes issue or PR as related to a bug.