Skip to content

Commit 61b9df5

Browse files
authored
add --kube-context to uninstall command (#4999)
1 parent 36f8d35 commit 61b9df5

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

pkg/kubernetes/helm.go

+3
Original file line numberDiff line numberDiff line change
@@ -296,6 +296,9 @@ func (h *HelmExecute) RunHelmUninstall() error {
296296
if len(h.config.Namespace) <= 0 {
297297
return fmt.Errorf("namespace has not been set, please configure namespace parameter")
298298
}
299+
if len(h.config.KubeContext) > 0 {
300+
helmParams = append(helmParams, "--kube-context", h.config.KubeContext)
301+
}
299302
helmParams = append(helmParams, "--namespace", h.config.Namespace)
300303
if h.config.HelmDeployWaitSeconds > 0 {
301304
helmParams = append(helmParams, "--wait", "--timeout", fmt.Sprintf("%vs", h.config.HelmDeployWaitSeconds))

0 commit comments

Comments
 (0)