Make tests deal with old and new topology labels

This commit is contained in:
Tim Hockin
2020-11-06 08:47:32 -08:00
parent f63ca48a1f
commit 3bd337baf4
4 changed files with 13 additions and 7 deletions

View File

@@ -163,6 +163,8 @@ func RestartNodes(c clientset.Interface, nodes []v1.Node) error {
zone := framework.TestContext.CloudConfig.Zone
if z, ok := node.Labels[v1.LabelFailureDomainBetaZone]; ok {
zone = z
} else if z, ok := node.Labels[v1.LabelTopologyZone]; ok {
zone = z
}
nodeNamesByZone[zone] = append(nodeNamesByZone[zone], node.Name)
}