mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-09-10 13:42:02 +00:00
Check CIDR before updating node status
This commit is contained in:
@@ -381,7 +381,9 @@ func (kl *Kubelet) tryUpdateNodeStatus(tryNumber int) error {
|
||||
return fmt.Errorf("nil %q node object", kl.nodeName)
|
||||
}
|
||||
|
||||
kl.updatePodCIDR(node.Spec.PodCIDR)
|
||||
if node.Spec.PodCIDR != "" {
|
||||
kl.updatePodCIDR(node.Spec.PodCIDR)
|
||||
}
|
||||
|
||||
kl.setNodeStatus(node)
|
||||
// Patch the current status on the API server
|
||||
|
Reference in New Issue
Block a user