Skip to content

Commit

Permalink
add --kube-context to uninstall command (#4999)
Browse files Browse the repository at this point in the history
  • Loading branch information
Googlom authored Jul 29, 2024
1 parent 36f8d35 commit 61b9df5
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions pkg/kubernetes/helm.go
Original file line number Diff line number Diff line change
Expand Up @@ -296,6 +296,9 @@ func (h *HelmExecute) RunHelmUninstall() error {
if len(h.config.Namespace) <= 0 {
return fmt.Errorf("namespace has not been set, please configure namespace parameter")
}
if len(h.config.KubeContext) > 0 {
helmParams = append(helmParams, "--kube-context", h.config.KubeContext)
}
helmParams = append(helmParams, "--namespace", h.config.Namespace)
if h.config.HelmDeployWaitSeconds > 0 {
helmParams = append(helmParams, "--wait", "--timeout", fmt.Sprintf("%vs", h.config.HelmDeployWaitSeconds))
Expand Down

0 comments on commit 61b9df5

Please sign in to comment.