From f2b10f39ace2d8ade0086bbe56b61f08c7f7452d Mon Sep 17 00:00:00 2001 From: Jan Safranek Date: Thu, 10 Nov 2022 18:26:00 +0100 Subject: [PATCH] Remove OpenStack cloud provider And keep OpenStack Cinder CSI translation Kubernetes-commit: 6005c3b5120d2bfa1ce72b02389ac951a0482545 --- examples/README.md | 1 - .../create-update-delete-deployment/main.go | 1 - .../main.go | 1 - .../in-cluster-client-configuration/main.go | 1 - .../main.go | 1 - .../client/auth/openstack/openstack_stub.go | 36 ------------------- plugin/pkg/client/auth/plugins_providers.go | 1 - 7 files changed, 42 deletions(-) delete mode 100644 plugin/pkg/client/auth/openstack/openstack_stub.go diff --git a/examples/README.md b/examples/README.md index 984aba00b5..0ec0e13d6a 100644 --- a/examples/README.md +++ b/examples/README.md @@ -19,7 +19,6 @@ 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/gcp" import _ "k8s.io/client-go/plugin/pkg/client/auth/oidc" -import _ "k8s.io/client-go/plugin/pkg/client/auth/openstack" ``` ### Configuration diff --git a/examples/create-update-delete-deployment/main.go b/examples/create-update-delete-deployment/main.go index 224dbc1251..dae3bc95f1 100644 --- a/examples/create-update-delete-deployment/main.go +++ b/examples/create-update-delete-deployment/main.go @@ -40,7 +40,6 @@ import ( // _ "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" - // _ "k8s.io/client-go/plugin/pkg/client/auth/openstack" ) func main() { diff --git a/examples/dynamic-create-update-delete-deployment/main.go b/examples/dynamic-create-update-delete-deployment/main.go index b7439e482d..cc6b122670 100644 --- a/examples/dynamic-create-update-delete-deployment/main.go +++ b/examples/dynamic-create-update-delete-deployment/main.go @@ -41,7 +41,6 @@ import ( // _ "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" - // _ "k8s.io/client-go/plugin/pkg/client/auth/openstack" ) func main() { diff --git a/examples/in-cluster-client-configuration/main.go b/examples/in-cluster-client-configuration/main.go index a8c71612e3..b583e33733 100644 --- a/examples/in-cluster-client-configuration/main.go +++ b/examples/in-cluster-client-configuration/main.go @@ -34,7 +34,6 @@ import ( // _ "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" - // _ "k8s.io/client-go/plugin/pkg/client/auth/openstack" ) func main() { diff --git a/examples/out-of-cluster-client-configuration/main.go b/examples/out-of-cluster-client-configuration/main.go index cf00d48094..7698e13218 100644 --- a/examples/out-of-cluster-client-configuration/main.go +++ b/examples/out-of-cluster-client-configuration/main.go @@ -37,7 +37,6 @@ import ( // _ "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" - // _ "k8s.io/client-go/plugin/pkg/client/auth/openstack" ) func main() { diff --git a/plugin/pkg/client/auth/openstack/openstack_stub.go b/plugin/pkg/client/auth/openstack/openstack_stub.go deleted file mode 100644 index 6e404beda2..0000000000 --- a/plugin/pkg/client/auth/openstack/openstack_stub.go +++ /dev/null @@ -1,36 +0,0 @@ -/* -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`) -} diff --git a/plugin/pkg/client/auth/plugins_providers.go b/plugin/pkg/client/auth/plugins_providers.go index ebfbd715c0..3f0688774e 100644 --- a/plugin/pkg/client/auth/plugins_providers.go +++ b/plugin/pkg/client/auth/plugins_providers.go @@ -23,5 +23,4 @@ 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" )