mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-23 19:56:01 +00:00
Merge pull request #123011 from dims/add-deprecation-notice-for-cloud-allocator-in-node-ipam-controller
Add DEPRECATION for CloudAllocator in node-ipam-controller
This commit is contained in:
commit
65e77e7775
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user