mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-21 02:41:25 +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:
commit
a9948158eb
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user