Skip to content

Commit

Permalink
helmExecute: add --kube-context to helm upgrade and install commands (#…
Browse files Browse the repository at this point in the history
…4995)

* add --kube-context to helm upgrade and install commands

* disable parallel running of unit tests

* undo disable parallel running of unit tests
  • Loading branch information
Googlom authored Jul 25, 2024
1 parent e6d4f40 commit 5861661
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions pkg/kubernetes/helm.go
Original file line number Diff line number Diff line change
Expand Up @@ -167,6 +167,10 @@ func (h *HelmExecute) RunHelmUpgrade() error {

helmParams = append(helmParams, "--wait", "--timeout", fmt.Sprintf("%vs", h.config.HelmDeployWaitSeconds))

if len(h.config.KubeContext) > 0 {
helmParams = append(helmParams, "--kube-context", h.config.KubeContext)
}

if !h.config.KeepFailedDeployments {
helmParams = append(helmParams, "--atomic")
}
Expand Down Expand Up @@ -238,6 +242,10 @@ func (h *HelmExecute) RunHelmInstall() error {
helmParams = append(helmParams, "--namespace", h.config.Namespace)
helmParams = append(helmParams, "--create-namespace")

if len(h.config.KubeContext) > 0 {
helmParams = append(helmParams, "--kube-context", h.config.KubeContext)
}

if !h.config.KeepFailedDeployments {
helmParams = append(helmParams, "--atomic")
}
Expand Down

0 comments on commit 5861661

Please sign in to comment.