mirror of
				https://github.com/optim-enterprises-bv/kubernetes.git
				synced 2025-11-04 12:18:16 +00:00 
			
		
		
		
	Merge pull request #11867 from kelseyhightower/node-cidrs-works-with-empty-cloud-provider
Allocating CIDRs for Pods works without a cloud provider.
This commit is contained in:
		@@ -205,12 +205,14 @@ func (s *CMServer) Run(_ []string) error {
 | 
				
			|||||||
	}
 | 
						}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	if s.AllocateNodeCIDRs {
 | 
						if s.AllocateNodeCIDRs {
 | 
				
			||||||
		routes, ok := cloud.Routes()
 | 
							if cloud == nil {
 | 
				
			||||||
		if !ok {
 | 
								glog.Warning("allocate-node-cidrs is set, but no cloud provider specified. Will not manage routes.")
 | 
				
			||||||
			glog.Fatal("Cloud provider must support routes if allocate-node-cidrs is set")
 | 
							} else if routes, ok := cloud.Routes(); !ok {
 | 
				
			||||||
 | 
								glog.Warning("allocate-node-cidrs is set, but cloud provider does not support routes. Will not manage routes.")
 | 
				
			||||||
 | 
							} else {
 | 
				
			||||||
 | 
								routeController := routecontroller.New(routes, kubeClient, s.ClusterName, (*net.IPNet)(&s.ClusterCIDR))
 | 
				
			||||||
 | 
								routeController.Run(s.NodeSyncPeriod)
 | 
				
			||||||
		}
 | 
							}
 | 
				
			||||||
		routeController := routecontroller.New(routes, kubeClient, s.ClusterName, (*net.IPNet)(&s.ClusterCIDR))
 | 
					 | 
				
			||||||
		routeController.Run(s.NodeSyncPeriod)
 | 
					 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	resourceQuotaManager := resourcequota.NewResourceQuotaManager(kubeClient)
 | 
						resourceQuotaManager := resourcequota.NewResourceQuotaManager(kubeClient)
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user