Skip to content

Commit

Permalink
Merge pull request #162 from piyushsingariya/feature/helm-apply-relea…
Browse files Browse the repository at this point in the history
…sename

[Helm] Adding release name field to action configuration
  • Loading branch information
leecalcote authored Mar 25, 2022
2 parents dbc9bee + ec0b506 commit db14bac
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions utils/kubernetes/apply-helm-chart.go
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,12 @@ type ApplyHelmChartConfig struct {
// are defined then URL is given the preferenece
ChartLocation HelmChartLocation

// ReleaseName for deploying charts
ReleaseName string

// SkipCRDs while installation
SkipCRDs bool

// URL is the url for charts
//
// Either ChartLocation or URL can be defined, if both of them
Expand Down Expand Up @@ -279,7 +285,7 @@ func updateActionIfReleaseFound(actionConfig *action.Configuration, cfg *ApplyHe
}

for _, r := range releases {
if r.Name == c.Name() {
if r.Name == cfg.ReleaseName {
cfg.Action = UPGRADE
return nil
}
Expand Down Expand Up @@ -441,7 +447,7 @@ func generateAction(actionConfig *action.Configuration, cfg ApplyHelmChartConfig
default:
return func(c *chart.Chart) error {
act := action.NewInstall(actionConfig)
act.ReleaseName = c.Name()
act.ReleaseName = cfg.ReleaseName
act.CreateNamespace = cfg.CreateNamespace
act.Namespace = cfg.Namespace
act.DryRun = cfg.DryRun
Expand Down

0 comments on commit db14bac

Please sign in to comment.