mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-30 15:05:27 +00:00
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. ```
This commit is contained in:
commit
084e068406
@ -33,8 +33,11 @@ type Factory func(config io.Reader) (Interface, error)
|
||||
|
||||
// All registered cloud providers.
|
||||
var (
|
||||
providersMutex sync.Mutex
|
||||
providers = make(map[string]Factory)
|
||||
providersMutex sync.Mutex
|
||||
providers = make(map[string]Factory)
|
||||
deprecatedCloudProviders = []string{
|
||||
"openstack",
|
||||
}
|
||||
)
|
||||
|
||||
const externalCloudProvider = "external"
|
||||
@ -95,6 +98,14 @@ func InitCloudProvider(name string, configFilePath string) (Interface, error) {
|
||||
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 != "" {
|
||||
var config *os.File
|
||||
config, err = os.Open(configFilePath)
|
||||
|
Loading…
Reference in New Issue
Block a user