diff --git a/cmd/kubectl/kubectlcobra/commands.go b/cmd/kubectl/kubectlcobra/commands.go index 62492b404..e47b56f37 100644 --- a/cmd/kubectl/kubectlcobra/commands.go +++ b/cmd/kubectl/kubectlcobra/commands.go @@ -17,9 +17,6 @@ import ( cmdutil "k8s.io/kubectl/pkg/cmd/util" "k8s.io/kubectl/pkg/util/i18n" "sigs.k8s.io/kustomize/kyaml/commandutil" - - // initialize auth - _ "k8s.io/client-go/plugin/pkg/client/auth" ) // GetCommand returns a command from kubectl to install diff --git a/cmd/kubectl/main.go b/cmd/kubectl/main.go index bba896c1f..6c70bb6f6 100644 --- a/cmd/kubectl/main.go +++ b/cmd/kubectl/main.go @@ -8,6 +8,10 @@ import ( "sigs.k8s.io/kustomize/cmd/kubectl/kubectlcobra" "sigs.k8s.io/kustomize/kyaml/commandutil" + + // This is here rather than in the libraries because of + // https://github.com/kubernetes-sigs/kustomize/issues/2060 + _ "k8s.io/client-go/plugin/pkg/client/auth" ) func main() { diff --git a/cmd/resource/main.go b/cmd/resource/main.go index 588ffd3ec..4df301e04 100644 --- a/cmd/resource/main.go +++ b/cmd/resource/main.go @@ -10,7 +10,9 @@ import ( "sigs.k8s.io/kustomize/cmd/resource/status" - _ "k8s.io/client-go/plugin/pkg/client/auth/gcp" + // This is here rather than in the libraries because of + // https://github.com/kubernetes-sigs/kustomize/issues/2060 + _ "k8s.io/client-go/plugin/pkg/client/auth" ) var root = &cobra.Command{ diff --git a/kustomize/main.go b/kustomize/main.go index 2dfb826a0..098dcfdca 100644 --- a/kustomize/main.go +++ b/kustomize/main.go @@ -9,6 +9,11 @@ import ( "sigs.k8s.io/kustomize/cmd/config/complete" "sigs.k8s.io/kustomize/kustomize/v3/internal/commands" + + // initialize auth + // This is here rather than in the libraries because of + // https://github.com/kubernetes-sigs/kustomize/issues/2060 + _ "k8s.io/client-go/plugin/pkg/client/auth" ) func main() {