Unverified Commit 084e0684 authored by Kubernetes Submit Queue's avatar Kubernetes Submit Queue Committed by GitHub

Merge pull request #63524 from dims/deprecate-in-tree-openstack-cloud-provider

Automatic merge from submit-queue (batch tested with PRs 63291, 63490, 60445, 63507, 63524). If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>. Deprecate in-tree OpenStack cloud provider **What this PR does / why we need it**: Warn operators and users to switch to the external cloud provider for openstack. **Which issue(s) this PR fixes** *(optional, in `fixes #<issue number>(, fixes #<issue_number>, ...)` format, will close the issue(s) when PR gets merged)*: Fixes # **Special notes for your reviewer**: **Release note**: ```release-note OpenStack built-in cloud provider is now deprecated. Please use the external cloud provider for OpenStack. ```
parents c27335fe e30fe2ba
...@@ -33,8 +33,11 @@ type Factory func(config io.Reader) (Interface, error) ...@@ -33,8 +33,11 @@ type Factory func(config io.Reader) (Interface, error)
// All registered cloud providers. // All registered cloud providers.
var ( var (
providersMutex sync.Mutex providersMutex sync.Mutex
providers = make(map[string]Factory) providers = make(map[string]Factory)
deprecatedCloudProviders = []string{
"openstack",
}
) )
const externalCloudProvider = "external" const externalCloudProvider = "external"
...@@ -95,6 +98,14 @@ func InitCloudProvider(name string, configFilePath string) (Interface, error) { ...@@ -95,6 +98,14 @@ func InitCloudProvider(name string, configFilePath string) (Interface, error) {
return nil, nil return nil, nil
} }
for _, provider := range deprecatedCloudProviders {
if provider == name {
glog.Warningf("WARNING: %s built-in cloud provider is now deprecated. "+
"Please use 'external' cloud provider for %s", name, name)
break
}
}
if configFilePath != "" { if configFilePath != "" {
var config *os.File var config *os.File
config, err = os.Open(configFilePath) config, err = os.Open(configFilePath)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment