Skip to content
This repository has been archived by the owner on Apr 29, 2024. It is now read-only.

Commit

Permalink
Merge pull request #989 from caos/fix-writesecret-nilpointer
Browse files Browse the repository at this point in the history
fix: omit k8s client when gitops mode, not crd
  • Loading branch information
eliobischof authored May 4, 2022
2 parents 61a76ea + fce966a commit 6ffb758
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ sandbox*
*.dll
*.so
*.dylib
orbctl
/orbctl

# Test binary, built with `go test -c`
*.test
Expand Down
2 changes: 1 addition & 1 deletion cmd/orbctl/readsecret.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
Expand Down
2 changes: 1 addition & 1 deletion cmd/orbctl/writesecret.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
Expand Down

0 comments on commit 6ffb758

Please sign in to comment.