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

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 ```
parents 4c09441a f8ac0c4d
...@@ -35,8 +35,13 @@ type Factory func(config io.Reader) (Interface, error) ...@@ -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) { ...@@ -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
} }
} }
......
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