mirror of
https://github.com/helmfile/helmfile.git
synced 2026-10-03 17:04:09 +02:00
Fix multiple --set in --args messed up in helmfile template (#1529)
Fixes #1520
This commit is contained in:
+9
-1
@@ -1410,6 +1410,15 @@ func (a *App) template(r *Run, c TemplateConfigProvider) (bool, []error) {
|
||||
// Traverse DAG of all the releases so that we don't suffer from false-positive missing dependencies
|
||||
st.Releases = allReleases
|
||||
|
||||
args := argparser.GetArgs(c.Args(), st)
|
||||
|
||||
// Reset the extra args if already set, not to break `helm fetch` by adding the args intended for `lint`
|
||||
helm.SetExtraArgs()
|
||||
|
||||
if len(args) > 0 {
|
||||
helm.SetExtraArgs(args...)
|
||||
}
|
||||
|
||||
if len(releasesToRender) > 0 {
|
||||
_, templateErrs := withDAG(st, helm, a.Logger, false, a.Wrap(func(subst *state.HelmState, helm helmexec.Interface) []error {
|
||||
var rs []state.ReleaseSpec
|
||||
@@ -1422,7 +1431,6 @@ func (a *App) template(r *Run, c TemplateConfigProvider) (bool, []error) {
|
||||
|
||||
subst.Releases = rs
|
||||
|
||||
args := argparser.GetArgs(c.Args(), st)
|
||||
opts := &state.TemplateOpts{
|
||||
Set: c.Set(),
|
||||
OutputDirTemplate: c.OutputDirTemplate(),
|
||||
|
||||
@@ -1149,15 +1149,8 @@ func (st *HelmState) TemplateReleases(helm helmexec.Interface, outputDir string,
|
||||
o.Apply(opts)
|
||||
}
|
||||
|
||||
// Reset the extra args if already set, not to break `helm fetch` by adding the args intended for `lint`
|
||||
helm.SetExtraArgs()
|
||||
|
||||
errs := []error{}
|
||||
|
||||
if len(args) > 0 {
|
||||
helm.SetExtraArgs(args...)
|
||||
}
|
||||
|
||||
for i := range st.Releases {
|
||||
release := &st.Releases[i]
|
||||
|
||||
|
||||
Reference in New Issue
Block a user