From fce966ad55d582dbaaa9afb39d62e4a1f920aeda Mon Sep 17 00:00:00 2001 From: Elio Bischof Date: Wed, 4 May 2022 10:20:13 +0200 Subject: [PATCH] fix: omit k8s client when gitops mode, not crd --- .gitignore | 2 +- cmd/orbctl/readsecret.go | 2 +- cmd/orbctl/writesecret.go | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.gitignore b/.gitignore index 33e0d010e..6b7b3a8c1 100644 --- a/.gitignore +++ b/.gitignore @@ -13,7 +13,7 @@ sandbox* *.dll *.so *.dylib -orbctl +/orbctl # Test binary, built with `go test -c` *.test diff --git a/cmd/orbctl/readsecret.go b/cmd/orbctl/readsecret.go index e4b0ffc5a..28296819d 100644 --- a/cmd/orbctl/readsecret.go +++ b/cmd/orbctl/readsecret.go @@ -31,7 +31,7 @@ orbctl readsecret orbiter.k8s.kubeconfig.encrypted > ~/.kube/config`, rv := getRv("readsecret", "", map[string]interface{}{"path": path}) defer rv.ErrFunc(err) - k8sClient, err := cli.Init(monitor, rv.OrbConfig, rv.GitClient, rv.Kubeconfig, rv.Gitops, rv.Gitops, !rv.Gitops) + k8sClient, err := cli.Init(monitor, rv.OrbConfig, rv.GitClient, rv.Kubeconfig, rv.Gitops, rv.Gitops, rv.Gitops) if err != nil && (!rv.Gitops || !errors.Is(err, cli.ErrNotInitialized)) { return err } diff --git a/cmd/orbctl/writesecret.go b/cmd/orbctl/writesecret.go index c74bd2447..d15ec1d44 100644 --- a/cmd/orbctl/writesecret.go +++ b/cmd/orbctl/writesecret.go @@ -55,7 +55,7 @@ orbctl writesecret mygceprovider.google_application_credentials_value.encrypted defer rv.ErrFunc(err) - k8sClient, err := cli.Init(monitor, rv.OrbConfig, rv.GitClient, rv.Kubeconfig, rv.Gitops, rv.Gitops, !rv.Gitops) + k8sClient, err := cli.Init(monitor, rv.OrbConfig, rv.GitClient, rv.Kubeconfig, rv.Gitops, rv.Gitops, rv.Gitops) if err != nil && (!rv.Gitops || !errors.Is(err, cli.ErrNotInitialized)) { return err }