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
-8
View File
@@ -597,10 +597,6 @@ func (helm *execer) exec(args []string, env map[string]string, overrideEnableLiv
enableLiveOutput = *overrideEnableLiveOutput
}
outBytes, err := helm.runner.Execute(helm.helmBinary, cmdargs, env, enableLiveOutput)
// Reset extra args after each helm execution
helm.SetExtraArgs()
return outBytes, err
}
@@ -618,10 +614,6 @@ func (helm *execer) execStdIn(args []string, env map[string]string, stdin io.Rea
cmd := fmt.Sprintf("exec: %s %s", helm.helmBinary, strings.Join(cmdargs, " "))
helm.logger.Debug(cmd)
outBytes, err := helm.runner.ExecuteStdIn(helm.helmBinary, cmdargs, env, stdin)
// Reset extra args after each helm execution
helm.SetExtraArgs()
return outBytes, err
}