Use topology labels instead of old beta names (#96033)

* Rename const for topology.../zone

* Rename const for topology.../region

* Rename const for failure-domain.../zone

* Rename const for failure-domain.../region

* Restore old names for compat
This commit is contained in:
Tim Hockin
2020-11-05 20:26:50 -08:00
committed by GitHub
parent cccd77bd3a
commit 819ff9b087
65 changed files with 630 additions and 624 deletions

View File

@@ -19,7 +19,7 @@ package testing
import (
"fmt"
"k8s.io/api/core/v1"
v1 "k8s.io/api/core/v1"
)
type keyVal struct {
@@ -44,7 +44,7 @@ func MakeNodesAndPodsForEvenPodsSpread(labels map[string]string, existingPodsNum
// build nodes
for i := 0; i < allNodesNum; i++ {
node := MakeNode().Name(fmt.Sprintf("node%d", i)).
Label(v1.LabelZoneFailureDomainStable, fmt.Sprintf("zone%d", i%zones)).
Label(v1.LabelTopologyZone, fmt.Sprintf("zone%d", i%zones)).
Label(v1.LabelHostname, fmt.Sprintf("node%d", i)).Obj()
allNodes = append(allNodes, node)
}