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:
Daniel Smith 2015-07-27 17:20:44 -07:00
commit a9948158eb

View File

@ -205,13 +205,15 @@ func (s *CMServer) Run(_ []string) error {
}
if s.AllocateNodeCIDRs {
routes, ok := cloud.Routes()
if !ok {
glog.Fatal("Cloud provider must support routes if allocate-node-cidrs is set")
}
if cloud == nil {
glog.Warning("allocate-node-cidrs is set, but no cloud provider specified. Will not manage routes.")
} 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)
}
}
resourceQuotaManager := resourcequota.NewResourceQuotaManager(kubeClient)
resourceQuotaManager.Run(s.ResourceQuotaSyncPeriod)