mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-21 19:01:49 +00:00
cloud-controller-manager: don't run cloud IPAM controller when cloud provider is not enabled
Signed-off-by: Andrew Sy Kim <andrewsy@google.com>
This commit is contained in:
parent
99d83fac37
commit
0a4f582c8b
@ -75,6 +75,11 @@ func startNodeIpamController(initContext app.ControllerInitContext, ccmConfig *c
|
||||
return nil, false, nil
|
||||
}
|
||||
|
||||
// Cannot run cloud ipam controller if cloud provider is nil (--cloud-provider not set or set to 'external')
|
||||
if cloud == nil && ccmConfig.ComponentConfig.KubeCloudShared.CIDRAllocatorType == string(ipam.CloudAllocatorType) {
|
||||
return nil, false, errors.New("--cidr-allocator-type is set to 'CloudAllocator' but cloud provider is not configured")
|
||||
}
|
||||
|
||||
// failure: bad cidrs in config
|
||||
clusterCIDRs, dualStack, err := processCIDRs(ccmConfig.ComponentConfig.KubeCloudShared.ClusterCIDR)
|
||||
if err != nil {
|
||||
|
Loading…
Reference in New Issue
Block a user