mirror of
https://github.com/k3s-io/kubernetes.git
synced 2026-01-06 07:57:35 +00:00
Don't try to create routes for nodes w/o CIDRs assigned.
This commit is contained in:
@@ -75,6 +75,10 @@ func (rc *RouteController) reconcile(nodes []api.Node, routes []*cloudprovider.R
|
||||
routeMap[route.TargetInstance] = route
|
||||
}
|
||||
for _, node := range nodes {
|
||||
// Skip if the node hasn't been assigned a CIDR yet.
|
||||
if node.Spec.PodCIDR == "" {
|
||||
continue
|
||||
}
|
||||
// Check if we have a route for this node w/ the correct CIDR.
|
||||
r := routeMap[node.Name]
|
||||
if r == nil || r.DestinationCIDR != node.Spec.PodCIDR {
|
||||
|
||||
Reference in New Issue
Block a user