diff --git a/pkg/cmd/testdata/output/template-dependency-update-recursive.txt b/pkg/cmd/testdata/output/template-dependency-update-recursive.txt index 5c451ad75..79afa5a50 100644 --- a/pkg/cmd/testdata/output/template-dependency-update-recursive.txt +++ b/pkg/cmd/testdata/output/template-dependency-update-recursive.txt @@ -8,6 +8,8 @@ apiVersion: v1 kind: ConfigMap metadata: name: dep1 + annotations: + text: This is a message from dep2!!! --- # Source: root/templates/configmaproot.yaml apiVersion: v1 diff --git a/pkg/cmd/testdata/testcharts/chart-with-multi-level-deps/dep1/templates/configmap1.yaml b/pkg/cmd/testdata/testcharts/chart-with-multi-level-deps/dep1/templates/configmap1.yaml index e80109f69..78c4b4315 100644 --- a/pkg/cmd/testdata/testcharts/chart-with-multi-level-deps/dep1/templates/configmap1.yaml +++ b/pkg/cmd/testdata/testcharts/chart-with-multi-level-deps/dep1/templates/configmap1.yaml @@ -2,3 +2,5 @@ apiVersion: v1 kind: ConfigMap metadata: name: dep1 + annotations: + text: {{ include "dep2.example" (index $.Subcharts "dep2") }} \ No newline at end of file diff --git a/pkg/cmd/testdata/testcharts/chart-with-multi-level-deps/dep2/templates/_helpers.tpl b/pkg/cmd/testdata/testcharts/chart-with-multi-level-deps/dep2/templates/_helpers.tpl new file mode 100644 index 000000000..5a51fc3f7 --- /dev/null +++ b/pkg/cmd/testdata/testcharts/chart-with-multi-level-deps/dep2/templates/_helpers.tpl @@ -0,0 +1,3 @@ +{{- define "dep2.example" }} +{{- "This is a message from dep2!!!" }} +{{- end }} \ No newline at end of file diff --git a/pkg/cmd/testdata/testcharts/chart-with-multi-level-deps/dep2/templates/configmap2.yaml b/pkg/cmd/testdata/testcharts/chart-with-multi-level-deps/dep2/templates/configmap2.yaml deleted file mode 100644 index 899e7f6ba..000000000 --- a/pkg/cmd/testdata/testcharts/chart-with-multi-level-deps/dep2/templates/configmap2.yaml +++ /dev/null @@ -1,4 +0,0 @@ -apiVersion: v1 -kind: ConfigMap -metadata: - name: dep2 diff --git a/pkg/downloader/manager.go b/pkg/downloader/manager.go index 7c4edb823..6087bbd8b 100644 --- a/pkg/downloader/manager.go +++ b/pkg/downloader/manager.go @@ -165,7 +165,20 @@ func (m *Manager) Update(recursive bool) error { } for _, depChartPath := range depChartPaths { - if err := m.doUpdate(depChartPath); err != nil { + subManager := &Manager{ + Out: m.Out, + ChartPath: depChartPath, + Verify: m.Verify, + Debug: m.Debug, + Keyring: m.Keyring, + SkipUpdate: m.SkipUpdate, + Getters: m.Getters, + RegistryClient: m.RegistryClient, + RepositoryConfig: m.RepositoryConfig, + RepositoryCache: m.RepositoryCache, + ContentCache: m.ContentCache, + } + if err := subManager.Update(recursive); err != nil { return err } }