From e35e6367298f6b2049185d04d2c058c21a4f2b46 Mon Sep 17 00:00:00 2001 From: Panos Koutsovasilis Date: Mon, 6 Jan 2025 02:56:36 +0200 Subject: [PATCH] fix: reload Helm chart for each example folder (#6475) (cherry picked from commit ed8e35151c13fa62f759cc7afe72c042989b5e65) --- magefile.go | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/magefile.go b/magefile.go index 21c8e33734..e24790a5ca 100644 --- a/magefile.go +++ b/magefile.go @@ -3400,12 +3400,7 @@ func (Helm) RenderExamples() error { settings := cli.New() // Helm CLI settings actionConfig := &action.Configuration{} - helmChart, err := loader.Load(helmChartPath) - if err != nil { - return fmt.Errorf("failed to load helm chart: %w", err) - } - - err = actionConfig.Init(settings.RESTClientGetter(), "default", "", + err := actionConfig.Init(settings.RESTClientGetter(), "default", "", func(format string, v ...interface{}) {}) if err != nil { return fmt.Errorf("failed to init helm action config: %w", err) @@ -3422,6 +3417,11 @@ func (Helm) RenderExamples() error { continue } + helmChart, err := loader.Load(helmChartPath) + if err != nil { + return fmt.Errorf("failed to load helm chart: %w", err) + } + exampleFullPath := filepath.Join(examplesPath, d.Name()) helmValues := make(map[string]any)