mirror of
https://github.com/helmfile/helmfile.git
synced 2026-10-18 15:44:20 +02:00
Fix redundant helm-dep-build and prepare hook regression (#1566)
Fixes #1511 Fixes #1497
This commit is contained in:
+16
-1
@@ -855,7 +855,22 @@ type chartPrepareResult struct {
|
||||
//
|
||||
// If exists, it will also patch resources by json patches, strategic-merge patches, and injectors.
|
||||
func (st *HelmState) PrepareCharts(helm helmexec.Interface, dir string, concurrency int, helmfileCommand string, opts ChartPrepareOptions) (map[string]string, []error) {
|
||||
releases := releasesNeedCharts(st.Releases)
|
||||
var selected []ReleaseSpec
|
||||
|
||||
if len(st.Selectors) > 0 {
|
||||
var err error
|
||||
|
||||
// This and releasesNeedCharts ensures that we run operations like helm-dep-build and prepare-hook calls only on
|
||||
// releases that are (1) selected by the selectors and (2) to be installed.
|
||||
selected, err = st.GetSelectedReleasesWithOverrides()
|
||||
if err != nil {
|
||||
return nil, []error{err}
|
||||
}
|
||||
} else {
|
||||
selected = st.Releases
|
||||
}
|
||||
|
||||
releases := releasesNeedCharts(selected)
|
||||
|
||||
temp := make(map[string]string, len(releases))
|
||||
|
||||
|
||||
Reference in New Issue
Block a user