diff --git a/pkg/argocd/argocd.go b/pkg/argocd/argocd.go index bcc63813..efb24d41 100644 --- a/pkg/argocd/argocd.go +++ b/pkg/argocd/argocd.go @@ -125,6 +125,10 @@ func Login(opts *LoginOptions) error { args = append(args, "--plaintext") } + if opts.KubeContext != "" { + args = append(args, "--kube-context", opts.KubeContext) + } + root.SetArgs(args) return root.Execute() }