Skip to content

Commit

Permalink
fix: load all supported authentication plugins for k8s client-go (#4802)
Browse files Browse the repository at this point in the history
Signed-off-by: kristoffer johansson <johanson.kristoffer@gmail.com>
  • Loading branch information
krijohs committed Dec 29, 2020
1 parent 78b0bff commit 7e6c799
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 21 deletions.
8 changes: 2 additions & 6 deletions cmd/argo/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,8 @@ import (
"os"

"github.com/argoproj/argo/cmd/argo/commands"
// load the azure plugin (required to authenticate against AKS clusters).
_ "k8s.io/client-go/plugin/pkg/client/auth/azure"
// load the gcp plugin (required to authenticate against GKE clusters).
_ "k8s.io/client-go/plugin/pkg/client/auth/gcp"
// load the oidc plugin (required to authenticate with OpenID Connect).
_ "k8s.io/client-go/plugin/pkg/client/auth/oidc"
// load authentication plugin for obtaining credentials from cloud providers.
_ "k8s.io/client-go/plugin/pkg/client/auth"
)

func main() {
Expand Down
8 changes: 2 additions & 6 deletions cmd/argoexec/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,8 @@ import (
"os"

"github.com/argoproj/argo/cmd/argoexec/commands"
// load the azure plugin (required to authenticate against AKS clusters).
_ "k8s.io/client-go/plugin/pkg/client/auth/azure"
// load the gcp plugin (required to authenticate against GKE clusters).
_ "k8s.io/client-go/plugin/pkg/client/auth/gcp"
// load the oidc plugin (required to authenticate with OpenID Connect).
_ "k8s.io/client-go/plugin/pkg/client/auth/oidc"
// load authentication plugin for obtaining credentials from cloud providers.
_ "k8s.io/client-go/plugin/pkg/client/auth"
)

func main() {
Expand Down
6 changes: 3 additions & 3 deletions cmd/workflow-controller/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,9 @@ import (
log "github.com/sirupsen/logrus"
"github.com/spf13/cobra"
"k8s.io/client-go/kubernetes"
_ "k8s.io/client-go/plugin/pkg/client/auth/azure"
_ "k8s.io/client-go/plugin/pkg/client/auth/gcp"
_ "k8s.io/client-go/plugin/pkg/client/auth/oidc"

// load authentication plugin for obtaining credentials from cloud providers.
_ "k8s.io/client-go/plugin/pkg/client/auth"
"k8s.io/client-go/tools/clientcmd"

wfclientset "github.com/argoproj/argo/pkg/client/clientset/versioned"
Expand Down
8 changes: 2 additions & 6 deletions test/e2e/fixtures/e2e_suite.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,8 @@ import (
"k8s.io/apimachinery/pkg/runtime/schema"
"k8s.io/client-go/dynamic"

// load the azure plugin (required to authenticate against AKS clusters).
_ "k8s.io/client-go/plugin/pkg/client/auth/azure"
// load the gcp plugin (required to authenticate against GKE clusters).
_ "k8s.io/client-go/plugin/pkg/client/auth/gcp"
// load the oidc plugin (required to authenticate with OpenID Connect).
_ "k8s.io/client-go/plugin/pkg/client/auth/oidc"
// load authentication plugin for obtaining credentials from cloud providers.
_ "k8s.io/client-go/plugin/pkg/client/auth"

"github.com/stretchr/testify/suite"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
Expand Down

0 comments on commit 7e6c799

Please sign in to comment.