mirror of
https://github.com/kubernetes/client-go.git
synced 2025-09-05 17:10:27 +00:00
Remove in-tree credential plugins (again)
This change reverts three commits: 1. Revert "Revert "Remove gcp and azure auth plugins"" This reverts commit 651b4f5b647a205d12fad4d0edc489d97109cccc. 2. Revert "update-gofmt" This reverts commit 79c09f0b310b8b66f8f14ad254f268788c42e076. 3. Revert "Update removal warnings to 1.26" This reverts commit 68758fc5c5099c83104a637e6d6ad3f4534f0d08. Signed-off-by: Monis Khan <mok@microsoft.com> Kubernetes-commit: 09cde58bbc13ff1229f61146221f56af4ff675dc
This commit is contained in:
committed by
Kubernetes Publisher
parent
e003fa92aa
commit
7d208ba573
36
plugin/pkg/client/auth/azure/azure_stub.go
Normal file
36
plugin/pkg/client/auth/azure/azure_stub.go
Normal file
@@ -0,0 +1,36 @@
|
||||
/*
|
||||
Copyright 2022 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 azure
|
||||
|
||||
import (
|
||||
"errors"
|
||||
|
||||
"k8s.io/client-go/rest"
|
||||
"k8s.io/klog/v2"
|
||||
)
|
||||
|
||||
func init() {
|
||||
if err := rest.RegisterAuthProviderPlugin("azure", newAzureAuthProvider); err != nil {
|
||||
klog.Fatalf("Failed to register azure auth plugin: %v", err)
|
||||
}
|
||||
}
|
||||
|
||||
func newAzureAuthProvider(_ string, _ map[string]string, _ rest.AuthProviderConfigPersister) (rest.AuthProvider, error) {
|
||||
return nil, errors.New(`The azure auth plugin has been removed.
|
||||
Please use the https://github.com/Azure/kubelogin kubectl/client-go credential plugin instead.
|
||||
See https://kubernetes.io/docs/reference/access-authn-authz/authentication/#client-go-credential-plugins for further details`)
|
||||
}
|
Reference in New Issue
Block a user