From 7a2f033a34b24a50d4dc92260c46ce69c729372d Mon Sep 17 00:00:00 2001 From: Ranjith M P <92041707+r1jt@users.noreply.github.com> Date: Tue, 29 Oct 2024 14:59:19 +0530 Subject: [PATCH] Update helm_utils.go Signed-off-by: Ranjith M P <92041707+r1jt@users.noreply.github.com> --- apps/helm_utils.go | 17 ----------------- 1 file changed, 17 deletions(-) diff --git a/apps/helm_utils.go b/apps/helm_utils.go index a3014c0..9298cb6 100644 --- a/apps/helm_utils.go +++ b/apps/helm_utils.go @@ -121,23 +121,6 @@ func GetInstalledProductChartVersionViaHelm(namespace string) (string, error) { return chartVersion, nil } -func UpgradeHelmChart(helmChart, namespace, releaseName string, values map[string]interface{}) error { - var vals []string - for k, v := range values { - vals = append(vals, fmt.Sprintf("%s=%v", k, v)) - } - setVals := strings.Join(vals, ",") - logf.Log.Info("executing helm upgrade ", "releaseName: ", releaseName, ", chart: ", helmChart, ", namespace: ", namespace, ", values: ", setVals) - // Define the Helm installation command. - cmd := exec.Command("helm", "upgrade", releaseName, helmChart, "-n", namespace, "--reuse-values", "--set", setVals) - // Execute the command. - output, err := cmd.CombinedOutput() - if err != nil { - return fmt.Errorf("failed to upgrade with Helm: %v\n%s", err, output) - } - return nil -} - type Chart struct { Name string `json:"name"` Version string `json:"version"`