Skip to content

Commit

Permalink
bug: write-values deletes provided --values files. (#1905)
Browse files Browse the repository at this point in the history
This fixes the bug by not including provided values files in the array of generated values, which is evalutated in a defered block.
Resolves #1904
  • Loading branch information
jgchristian authored Sep 14, 2021
1 parent f57b510 commit 2792ef7
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions pkg/state/state.go
Original file line number Diff line number Diff line change
Expand Up @@ -1473,7 +1473,6 @@ func (st *HelmState) WriteReleasesValues(helm helmexec.Interface, additionalValu
if _, err := os.Stat(valfile); os.IsNotExist(err) {
return []error{err}
}
generatedFiles = append(generatedFiles, valfile)
}

outputValuesFile, err := st.GenerateOutputFilePath(release, opts.OutputFileTemplate)
Expand All @@ -1489,7 +1488,7 @@ func (st *HelmState) WriteReleasesValues(helm helmexec.Interface, additionalValu

merged := map[string]interface{}{}

for _, f := range generatedFiles {
for _, f := range append(generatedFiles, additionalValues...) {
src := map[string]interface{}{}

srcBytes, err := st.readFile(f)
Expand Down

0 comments on commit 2792ef7

Please sign in to comment.