Files
kubernetes/pkg/controller
Kubernetes Submit Queue 15ef3a8ba4 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). 
```
2018-01-12 20:34:50 -08:00
..
2017-12-23 13:12:11 -08:00
2018-01-05 15:05:01 -08:00
2017-12-23 13:12:11 -08:00
2018-01-05 15:05:01 -08:00
2018-01-08 18:42:01 +08:00
2017-12-23 13:12:11 -08:00
2017-12-23 13:12:11 -08:00
2017-12-23 13:12:11 -08:00
2017-12-23 13:12:11 -08:00
2017-12-23 13:12:11 -08:00
2017-12-23 13:12:11 -08:00
2017-12-23 13:12:11 -08:00
2017-12-23 13:12:11 -08:00
2017-12-23 13:12:11 -08:00
2017-11-09 12:14:08 +01:00
2017-12-23 13:12:11 -08:00
2017-11-14 17:18:17 +08:00