Skip to content

Commit

Permalink
Update helm_utils.go
Browse files Browse the repository at this point in the history
Signed-off-by: Ranjith M P <[email protected]>
  • Loading branch information
r1jt authored Oct 29, 2024
1 parent d28eaef commit 7a2f033
Showing 1 changed file with 0 additions and 17 deletions.
17 changes: 0 additions & 17 deletions apps/helm_utils.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"`
Expand Down

0 comments on commit 7a2f033

Please sign in to comment.