Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #58186 from negz/master
Automatic merge from submit-queue (batch tested with PRs 57266, 58187, 58186, 46245, 56509). If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>. Avoid panic in Cloud CIDR Allocator **What this PR does / why we need it**: I suspect a race exists where we attempt to look up the CIDR for a terminating node. By the time `updateCIDRAllocation` is called the node has disappeared. We determine it does not have a cloud CIDR (i.e. Alias IP Range) and attempt to record a `CIDRNotAvailable` node status. Unfortunately we reference `node.Name` while `node` is still nil. By getting the node before looking up the cloud CIDR we avoid the nil pointer dereference, and potentially fail fast in the case the node has disappeared. **Which issue(s) this PR fixes**: Fixes #58181 **Release note**: ```release-note Avoid panic when failing to allocate a Cloud CIDR (aka GCE Alias IP Range). ```
- Loading branch information