mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-08-08 11:38:15 +00:00
Deprecate in-tree OpenStack cloud provider
Warn operators and users to switch to the external cloud provider for openstack.
This commit is contained in:
parent
af70337f8c
commit
e30fe2ba4b
@ -35,6 +35,9 @@ type Factory func(config io.Reader) (Interface, error)
|
|||||||
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) {
|
|||||||
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)
|
||||||
|
Loading…
Reference in New Issue
Block a user