Skip to content

Commit

Permalink
Load client-auth plugins
Browse files Browse the repository at this point in the history
Without this change, for example, kops connections using OIDC to the
cluster will receive this error message:

> cannot build kube client for "$CLUSTER_NAME": No Auth Provider found
> for name "oidc"

kubernetes/client-go#345 suggests importing the package path
`plugin/pkg/client/auth/oidc` from `client-go`, but looking at the code
`plugin/pkg/client/auth` will actually handle loading all known auth
plugins for us.
  • Loading branch information
ripta committed Jul 24, 2018
1 parent 729d935 commit 843fdb5
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
1 change: 1 addition & 0 deletions cmd/kops/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -173,5 +173,6 @@ go_test(
"//vendor/golang.org/x/crypto/ssh:go_default_library",
"//vendor/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library",
"//vendor/k8s.io/apimachinery/pkg/runtime/schema:go_default_library",
"//vendor/k8s.io/client-go/plugin/pkg/client/auth:go_default_library",
],
)
1 change: 1 addition & 0 deletions cmd/kops/rollingupdatecluster.go
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ import (
"k8s.io/api/core/v1"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
"k8s.io/client-go/kubernetes"
_ "k8s.io/client-go/plugin/pkg/client/auth"
"k8s.io/client-go/tools/clientcmd"
"k8s.io/kops/cmd/kops/util"
api "k8s.io/kops/pkg/apis/kops"
Expand Down

0 comments on commit 843fdb5

Please sign in to comment.