remove IsDeprecatedInternal from cloudprovider.plugins

The internal cloud controller loops are disabled at this point, this
function should not be used as it does not return accurate information.
In its place we check for the presence of the external cloud provider as
that is the only acceptable value.
This commit is contained in:
elmiko
2024-09-26 14:55:16 -04:00
parent ff391cefe2
commit d1d05d3eba
4 changed files with 3 additions and 15 deletions

View File

@@ -35,7 +35,7 @@ func createCloudProvider(logger klog.Logger, cloudProvider string, externalCloud
var loopMode ControllerLoopMode
var err error
if utilfeature.DefaultFeatureGate.Enabled(features.DisableCloudProviders) && cloudprovider.IsDeprecatedInternal(cloudProvider) {
if utilfeature.DefaultFeatureGate.Enabled(features.DisableCloudProviders) && !cloudprovider.IsExternal(cloudProvider) {
cloudprovider.DisableWarningForProvider(cloudProvider)
return nil, ExternalLoops, 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",