mirror of
https://github.com/kubernetes/client-go.git
synced 2025-08-14 13:33:22 +00:00
Revert "Remove references to openstack and cinder"
This reverts commit 9bbf01bae93600d3314bce0acbff1f3a0a42e74b. Kubernetes-commit: 5b284a50b78cb7d68b12825f5c0cfa29503c1577
This commit is contained in:
parent
cfd682c60b
commit
a3d3eb0cc9
@ -19,6 +19,7 @@ Or you can load specific auth plugins:
|
|||||||
import _ "k8s.io/client-go/plugin/pkg/client/auth/azure"
|
import _ "k8s.io/client-go/plugin/pkg/client/auth/azure"
|
||||||
import _ "k8s.io/client-go/plugin/pkg/client/auth/gcp"
|
import _ "k8s.io/client-go/plugin/pkg/client/auth/gcp"
|
||||||
import _ "k8s.io/client-go/plugin/pkg/client/auth/oidc"
|
import _ "k8s.io/client-go/plugin/pkg/client/auth/oidc"
|
||||||
|
import _ "k8s.io/client-go/plugin/pkg/client/auth/openstack"
|
||||||
```
|
```
|
||||||
|
|
||||||
### Configuration
|
### Configuration
|
||||||
|
@ -40,6 +40,7 @@ import (
|
|||||||
// _ "k8s.io/client-go/plugin/pkg/client/auth/azure"
|
// _ "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/gcp"
|
||||||
// _ "k8s.io/client-go/plugin/pkg/client/auth/oidc"
|
// _ "k8s.io/client-go/plugin/pkg/client/auth/oidc"
|
||||||
|
// _ "k8s.io/client-go/plugin/pkg/client/auth/openstack"
|
||||||
)
|
)
|
||||||
|
|
||||||
func main() {
|
func main() {
|
||||||
|
@ -41,6 +41,7 @@ import (
|
|||||||
// _ "k8s.io/client-go/plugin/pkg/client/auth/azure"
|
// _ "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/gcp"
|
||||||
// _ "k8s.io/client-go/plugin/pkg/client/auth/oidc"
|
// _ "k8s.io/client-go/plugin/pkg/client/auth/oidc"
|
||||||
|
// _ "k8s.io/client-go/plugin/pkg/client/auth/openstack"
|
||||||
)
|
)
|
||||||
|
|
||||||
func main() {
|
func main() {
|
||||||
|
@ -34,6 +34,7 @@ import (
|
|||||||
// _ "k8s.io/client-go/plugin/pkg/client/auth/azure"
|
// _ "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/gcp"
|
||||||
// _ "k8s.io/client-go/plugin/pkg/client/auth/oidc"
|
// _ "k8s.io/client-go/plugin/pkg/client/auth/oidc"
|
||||||
|
// _ "k8s.io/client-go/plugin/pkg/client/auth/openstack"
|
||||||
)
|
)
|
||||||
|
|
||||||
func main() {
|
func main() {
|
||||||
|
@ -37,6 +37,7 @@ import (
|
|||||||
// _ "k8s.io/client-go/plugin/pkg/client/auth/azure"
|
// _ "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/gcp"
|
||||||
// _ "k8s.io/client-go/plugin/pkg/client/auth/oidc"
|
// _ "k8s.io/client-go/plugin/pkg/client/auth/oidc"
|
||||||
|
// _ "k8s.io/client-go/plugin/pkg/client/auth/openstack"
|
||||||
)
|
)
|
||||||
|
|
||||||
func main() {
|
func main() {
|
||||||
|
36
plugin/pkg/client/auth/openstack/openstack_stub.go
Normal file
36
plugin/pkg/client/auth/openstack/openstack_stub.go
Normal file
@ -0,0 +1,36 @@
|
|||||||
|
/*
|
||||||
|
Copyright 2020 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 openstack
|
||||||
|
|
||||||
|
import (
|
||||||
|
"errors"
|
||||||
|
|
||||||
|
"k8s.io/client-go/rest"
|
||||||
|
"k8s.io/klog/v2"
|
||||||
|
)
|
||||||
|
|
||||||
|
func init() {
|
||||||
|
if err := rest.RegisterAuthProviderPlugin("openstack", newOpenstackAuthProvider); err != nil {
|
||||||
|
klog.Fatalf("Failed to register openstack auth plugin: %s", err)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
func newOpenstackAuthProvider(_ string, _ map[string]string, _ rest.AuthProviderConfigPersister) (rest.AuthProvider, error) {
|
||||||
|
return nil, errors.New(`The openstack auth plugin has been removed.
|
||||||
|
Please use the "client-keystone-auth" kubectl/client-go credential plugin instead.
|
||||||
|
See https://github.com/kubernetes/cloud-provider-openstack/blob/master/docs/using-client-keystone-auth.md for further details`)
|
||||||
|
}
|
@ -23,4 +23,5 @@ import (
|
|||||||
// Initialize client auth plugins for cloud providers.
|
// Initialize client auth plugins for cloud providers.
|
||||||
_ "k8s.io/client-go/plugin/pkg/client/auth/azure"
|
_ "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/gcp"
|
||||||
|
_ "k8s.io/client-go/plugin/pkg/client/auth/openstack"
|
||||||
)
|
)
|
||||||
|
Loading…
Reference in New Issue
Block a user