mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-27 13:37:30 +00:00
Merge pull request #63686 from dougm/deprecate-photon
Automatic merge from submit-queue (batch tested with PRs 63686, 63736). 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 photon cloud provider vmware/photon-controller is no longer maintained, as of Oct 2017. Adds a detail field to deprecatedCloudProviders, meant for pointing to external provider url or other reason for deprecation. **What this PR does / why we need it**: The photon cloud provider is no longer supported, need to let users know. Photon controller support has already been removed from kube-up in PR #58096 **Release note**: ```release-note NONE ```
This commit is contained in:
commit
f7ccaae269
@ -35,8 +35,13 @@ 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{
|
deprecatedCloudProviders = []struct {
|
||||||
"openstack",
|
name string
|
||||||
|
external bool
|
||||||
|
detail string
|
||||||
|
}{
|
||||||
|
{"openstack", true, "https://github.com/kubernetes/cloud-provider-openstack"},
|
||||||
|
{"photon", false, "The Photon Controller project is no longer maintained."},
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
|
|
||||||
@ -99,9 +104,13 @@ func InitCloudProvider(name string, configFilePath string) (Interface, error) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
for _, provider := range deprecatedCloudProviders {
|
for _, provider := range deprecatedCloudProviders {
|
||||||
if provider == name {
|
if provider.name == name {
|
||||||
glog.Warningf("WARNING: %s built-in cloud provider is now deprecated. "+
|
detail := provider.detail
|
||||||
"Please use 'external' cloud provider for %s", name, name)
|
if provider.external {
|
||||||
|
detail = fmt.Sprintf("Please use 'external' cloud provider for %s: %s", name, provider.detail)
|
||||||
|
}
|
||||||
|
glog.Warningf("WARNING: %s built-in cloud provider is now deprecated. %s", name, detail)
|
||||||
|
|
||||||
break
|
break
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user