diff --git a/cmd/kube-controller-manager/app/core.go b/cmd/kube-controller-manager/app/core.go index 467487739ba..222c4951f0e 100644 --- a/cmd/kube-controller-manager/app/core.go +++ b/cmd/kube-controller-manager/app/core.go @@ -126,9 +126,13 @@ func startNodeIpamController(ctx context.Context, controllerContext ControllerCo return nil, false, nil } - // Cannot run cloud ipam controller if cloud provider is nil (--cloud-provider not set or set to 'external') - if controllerContext.Cloud == nil && controllerContext.ComponentConfig.KubeCloudShared.CIDRAllocatorType == string(ipam.CloudAllocatorType) { - return nil, false, errors.New("--cidr-allocator-type is set to 'CloudAllocator' but cloud provider is not configured") + if controllerContext.ComponentConfig.KubeCloudShared.CIDRAllocatorType == string(ipam.CloudAllocatorType) { + // Cannot run cloud ipam controller if cloud provider is nil (--cloud-provider not set or set to 'external') + if controllerContext.Cloud == nil { + return nil, false, errors.New("--cidr-allocator-type is set to 'CloudAllocator' but cloud provider is not configured") + } + // As part of the removal of all the cloud providers from kubernetes, this support will be removed as well + klog.Warningf("DEPRECATED: 'CloudAllocator' bas been deprecated and will be removed in a future release.") } clusterCIDRs, err := validateCIDRs(controllerContext.ComponentConfig.KubeCloudShared.ClusterCIDR)