bug: write-values deletes provided --values files. (#1905)

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
This commit is contained in:
James Christian 2021-09-14 06:51:22 +01:00 committed by GitHub
parent f57b510d01
commit 2792ef75d1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 2 deletions

View File

@ -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)
@ -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)