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,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)