mirror of
				https://github.com/optim-enterprises-bv/kubernetes.git
				synced 2025-11-03 19:58:17 +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:
		@@ -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 {
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user