From aee533fed88c2cc9d6d14b3de4fce432cadfe3d8 Mon Sep 17 00:00:00 2001 From: jsvk <850037+jsvk@users.noreply.github.com> Date: Fri, 6 Dec 2024 21:02:04 -0500 Subject: [PATCH] Change Coalesce to Merge Signed-off-by: jsvk <850037+jsvk@users.noreply.github.com> --- cmd/helm/install_test.go | 1 - cmd/helm/testdata/output/issue-9027.txt | 8 ++++++++ pkg/chartutil/values.go | 2 +- 3 files changed, 9 insertions(+), 2 deletions(-) diff --git a/cmd/helm/install_test.go b/cmd/helm/install_test.go index 682b25164..5b351bb2f 100644 --- a/cmd/helm/install_test.go +++ b/cmd/helm/install_test.go @@ -196,7 +196,6 @@ func TestInstall(t *testing.T) { name: "install with schema file, extra values from yaml, with errors", cmd: "install schema testdata/testcharts/chart-with-schema -f testdata/testcharts/chart-with-schema/extra-values.yaml", wantError: true, - golden: "output/schema-negative.txt", }, // Install, values from yaml, extra values from cli, schematized with errors { diff --git a/cmd/helm/testdata/output/issue-9027.txt b/cmd/helm/testdata/output/issue-9027.txt index eb19fc383..8f6b6dd41 100644 --- a/cmd/helm/testdata/output/issue-9027.txt +++ b/cmd/helm/testdata/output/issue-9027.txt @@ -2,11 +2,15 @@ # Source: issue-9027/charts/subchart/templates/values.yaml global: hash: + key1: null + key2: null key3: 13 key4: 4 key5: 5 key6: 6 hash: + key1: null + key2: null key3: 13 key4: 4 key5: 5 @@ -21,11 +25,15 @@ global: subchart: global: hash: + key1: null + key2: null key3: 13 key4: 4 key5: 5 key6: 6 hash: + key1: null + key2: null key3: 13 key4: 4 key5: 5 diff --git a/pkg/chartutil/values.go b/pkg/chartutil/values.go index 61c633a6d..fc65539a2 100644 --- a/pkg/chartutil/values.go +++ b/pkg/chartutil/values.go @@ -158,7 +158,7 @@ func ToRenderValuesWithSchemaValidation(chrt *chart.Chart, chrtVals map[string]i }, } - vals, err := CoalesceValues(chrt, chrtVals) + vals, err := MergeValues(chrt, chrtVals) if err != nil { return top, err }