From ac49e87f5a6113008bd992a4c6ba7a7cc609240e Mon Sep 17 00:00:00 2001 From: Davanum Srinivas Date: Sun, 28 Mar 2021 20:05:32 -0400 Subject: [PATCH] providerless tag for client-go auth plugins Signed-off-by: Davanum Srinivas Kubernetes-commit: c77bf835b8409da66d4f2a220c92a902d0888f9c --- plugin/pkg/client/auth/plugins.go | 7 +++--- plugin/pkg/client/auth/plugins_providers.go | 26 +++++++++++++++++++++ 2 files changed, 29 insertions(+), 4 deletions(-) create mode 100644 plugin/pkg/client/auth/plugins_providers.go diff --git a/plugin/pkg/client/auth/plugins.go b/plugin/pkg/client/auth/plugins.go index 42085d7ae1..f4c1eaf4f8 100644 --- a/plugin/pkg/client/auth/plugins.go +++ b/plugin/pkg/client/auth/plugins.go @@ -1,3 +1,5 @@ +// +build providerless + /* Copyright 2016 The Kubernetes Authors. @@ -17,9 +19,6 @@ limitations under the License. package auth import ( - // Initialize all known client auth plugins. - _ "k8s.io/client-go/plugin/pkg/client/auth/azure" - _ "k8s.io/client-go/plugin/pkg/client/auth/gcp" + // Initialize common client auth plugins. _ "k8s.io/client-go/plugin/pkg/client/auth/oidc" - _ "k8s.io/client-go/plugin/pkg/client/auth/openstack" ) diff --git a/plugin/pkg/client/auth/plugins_providers.go b/plugin/pkg/client/auth/plugins_providers.go new file mode 100644 index 0000000000..967039662c --- /dev/null +++ b/plugin/pkg/client/auth/plugins_providers.go @@ -0,0 +1,26 @@ +// +build !providerless + +/* +Copyright 2016 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package auth + +import ( + // Initialize client auth plugins for cloud providers. + _ "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/openstack" +)