mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-21 02:41:25 +00:00
Merge pull request #27891 from mml/fed-nil-node
Automatic merge from submit-queue Catch the case where we cannot find any nodes.
This commit is contained in:
commit
db43b68640
@ -659,6 +659,10 @@ func (kd *KubeDNS) getClusterZone() (string, error) {
|
||||
}
|
||||
}
|
||||
|
||||
if node == nil {
|
||||
return "", fmt.Errorf("Could not find any nodes")
|
||||
}
|
||||
|
||||
zone, ok := node.Annotations[unversioned.LabelZoneFailureDomain]
|
||||
if !ok || zone == "" {
|
||||
return "", fmt.Errorf("unknown cluster zone")
|
||||
|
Loading…
Reference in New Issue
Block a user