Skip to content

Commit

Permalink
fix: removed bug that would add values files twice for helm and ytt r…
Browse files Browse the repository at this point in the history
…endering
  • Loading branch information
fritzduchardt committed Dec 1, 2023
1 parent 8cbb734 commit 40cb608
Showing 1 changed file with 1 addition and 7 deletions.
8 changes: 1 addition & 7 deletions internal/myks/render.go
Original file line number Diff line number Diff line change
Expand Up @@ -181,15 +181,9 @@ func (a *Application) prepareValuesFile(dirName string, resourceName string) (st
// add prototype overwrites value file from env dir groups
valuesFiles = append(valuesFiles, a.e.collectBySubpath(filepath.Join(a.e.g.PrototypeOverrideDir, a.prototypeDirName(), valuesFileName))...)

// add application values file from env dir groups
// add application values file from env dir and groups
valuesFiles = append(valuesFiles, a.e.collectBySubpath(filepath.Join(a.e.g.AppsDir, a.Name, valuesFileName))...)

// add values file from env dir
envValuesFile := filepath.Join(a.e.Dir, a.e.g.AppsDir, a.Name, valuesFileName)
if _, err := os.Stat(envValuesFile); err == nil {
valuesFiles = append(valuesFiles, envValuesFile)
}

if len(valuesFiles) == 0 {
log.Debug().Str("resource", resourceName).Msg(a.Msg(renderStepName, "No values files found"))
return "", nil
Expand Down

0 comments on commit 40cb608

Please sign in to comment.