diff --git a/pkg/chart/common/util/coalesce.go b/pkg/chart/common/util/coalesce.go index 9ecd046f9..7d40c0a0e 100644 --- a/pkg/chart/common/util/coalesce.go +++ b/pkg/chart/common/util/coalesce.go @@ -168,6 +168,10 @@ func coalesceGlobals(printf printFn, dest, src map[string]any, prefix string, _ printf("warning: unable to convert globals copy to Helm values type") continue } + // Ensure vv is a non-nil map so that merges into it are not lost. + if vv == nil { + vv = make(map[string]any) + } if destv, ok := dg[key]; !ok { // Here there is no merge. We're just adding. dg[key] = vv