Add integration tests for #1749 (#1766)

* Add integration tests for #1749

Signed-off-by: Matthias Baur <m.baur@syseleven.de>

* Reset extra args on a higher level to only affect subsequent helmfiles

With the implementation before, extra args has been reset after each
helm.exec which leads to problems with multiple charts in a helmfile
since the correct args are only set once in Template(). But Template()
calls helm.exec(template) multiple times.

Signed-off-by: Matthias Baur <m.baur@syseleven.de>

---------

Signed-off-by: Matthias Baur <m.baur@syseleven.de>
This commit is contained in:
Matthias Baur
2024-11-06 08:12:20 +08:00
committed by GitHub
parent 8ee56f13f3
commit d23dc8a9de
7 changed files with 66 additions and 8 deletions
+5
View File
@@ -1439,6 +1439,11 @@ func (st *HelmState) runHelmDepBuilds(helm helmexec.Interface, concurrency int,
// So we shouldn't use goroutines like we do for other helm operations here.
//
// See https://github.com/roboll/helmfile/issues/1521
// Reset helm extra args to not pollute BuildDeps() on subsequent helmfiles
// https://github.com/helmfile/helmfile/issues/1749
helm.SetExtraArgs()
for _, r := range builds {
buildDepsFlags := getBuildDepsFlags(r)
if err := helm.BuildDeps(r.releaseName, r.chartPath, buildDepsFlags...); err != nil {