You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
this change removes the deprecation warning function in favor of using
the `cloudprovider.DisableWarningForProvider`. it also fixes some of the
logic to ensure that non-external providers are properly detected and
warned about.
"cloud provider %q was specified, but built-in cloud providers are disabled. Please set --cloud-provider=external and migrate to an external cloud provider",
42
-
cloudProvider)
43
-
}
34
+
loopMode:=ExternalLoops
44
35
45
36
ifcloudprovider.IsExternal(cloudProvider) {
46
-
loopMode=ExternalLoops
47
37
ifexternalCloudVolumePlugin=="" {
48
38
// externalCloudVolumePlugin is temporary until we split all cloud providers out.
49
39
// So we just tell the caller that we need to run ExternalLoops without any cloud provider.
returnnil, fmt.Errorf("cloud provider %q was specified, but built-in cloud providers are disabled. Please set --cloud-provider=external and migrate to an external cloud provider", cloudProvider)
klog.Infof("INFO: Please make sure you are running external cloud controller manager binary for provider %q."+
93
-
"In-tree cloud providers are currently disabled. Refer to https://github.com/kubernetes/kubernetes/tree/master/staging/src/k8s.io/cloud-provider/sample"+
94
-
"for example implementation.", providerName)
95
-
detail:=fmt.Sprintf("Please reach to sig-cloud-provider and use 'external' cloud provider for %q: %s", providerName, provider.detail)
96
-
klog.Warningf("WARNING: %q built-in cloud provider is now disabled. %s", providerName, detail)
97
-
break
98
-
}
85
+
if!IsExternal(providerName) {
86
+
klog.Infof("INFO: Please make sure you are running an external cloud controller manager binary for provider %q."+
87
+
"In-tree cloud providers are disabled. Refer to https://github.com/kubernetes/kubernetes/tree/master/staging/src/k8s.io/cloud-provider/sample "+
88
+
"for an example implementation.", providerName)
89
+
klog.Warningf("WARNING: built-in cloud providers are disabled. Please set \"--cloud-provider=external\" and migrate to an external cloud controller manager for provider %q", providerName)
99
90
}
100
91
}
101
92
102
-
// DeprecationWarningForProvider logs information about deprecated cloud provider state
returnfmt.Errorf("cloud provider %q was specified, but built-in cloud providers are disabled. Please set --cloud-provider=external and migrate to an external cloud provider", providerName)
117
96
}
118
97
119
98
// InitCloudProvider creates an instance of the named cloud provider.
0 commit comments