From 4cedfbf5691e44e3ebbe7169cc8d556ed731281d Mon Sep 17 00:00:00 2001 From: Rotem Cohen Date: Tue, 28 Jun 2022 16:33:04 +0300 Subject: [PATCH] add kube context to argocd login cmd (#326) Signed-off-by: kim-codefresh --- pkg/argocd/argocd.go | 4 ++++ 1 file changed, 4 insertions(+) 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() }