parent
14e2b9ed93
commit
b42e847154
|
|
@ -813,6 +813,9 @@ type ChartPrepareOptions struct {
|
||||||
//
|
//
|
||||||
// If exists, it will also patch resources by json patches, strategic-merge patches, and injectors.
|
// 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) {
|
func (st *HelmState) PrepareCharts(helm helmexec.Interface, dir string, concurrency int, helmfileCommand string, opts ChartPrepareOptions) (map[string]string, []error) {
|
||||||
|
depBuiltChartsMu := &sync.Mutex{}
|
||||||
|
depBuiltCharts := map[string]bool{}
|
||||||
|
|
||||||
releases := releasesNeedCharts(st.Releases)
|
releases := releasesNeedCharts(st.Releases)
|
||||||
|
|
||||||
temp := make(map[string]string, len(releases))
|
temp := make(map[string]string, len(releases))
|
||||||
|
|
@ -924,7 +927,19 @@ func (st *HelmState) PrepareCharts(helm helmexec.Interface, dir string, concurre
|
||||||
// a broken remote chart won't completely block their job.
|
// a broken remote chart won't completely block their job.
|
||||||
chartPath = normalizeChart(st.basePath, chartPath)
|
chartPath = normalizeChart(st.basePath, chartPath)
|
||||||
|
|
||||||
if !opts.SkipRepos {
|
var doBuildDeps bool
|
||||||
|
|
||||||
|
depBuiltChartsMu.Lock()
|
||||||
|
if depBuiltCharts == nil {
|
||||||
|
depBuiltCharts = map[string]bool{}
|
||||||
|
}
|
||||||
|
if !depBuiltCharts[chartPath] {
|
||||||
|
depBuiltCharts[chartPath] = true
|
||||||
|
doBuildDeps = true
|
||||||
|
}
|
||||||
|
depBuiltChartsMu.Unlock()
|
||||||
|
|
||||||
|
if !opts.SkipRepos && doBuildDeps {
|
||||||
if err := helm.BuildDeps(release.Name, chartPath); err != nil {
|
if err := helm.BuildDeps(release.Name, chartPath); err != nil {
|
||||||
if chartFetchedByGoGetter {
|
if chartFetchedByGoGetter {
|
||||||
diagnostic = fmt.Sprintf(
|
diagnostic = fmt.Sprintf(
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue