From be1f8b14492fc9cca6ad16b40da673f24caabd99 Mon Sep 17 00:00:00 2001 From: "mergify[bot]" <37929162+mergify[bot]@users.noreply.github.com> Date: Mon, 6 Jan 2025 08:45:19 +0100 Subject: [PATCH] fix: reload Helm chart for each example folder (#6475) (#6479) (cherry picked from commit ed8e35151c13fa62f759cc7afe72c042989b5e65) Co-authored-by: Panos Koutsovasilis --- 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)