mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-21 10:51:29 +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,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)
|
||||||
|
Loading…
Reference in New Issue
Block a user