mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-09-10 21:50:05 +00:00
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:
@@ -136,7 +136,7 @@ func BenchmarkSchedulingWaitForFirstConsumerPVs(b *testing.B) {
|
||||
}
|
||||
basePod := makeBasePod()
|
||||
testStrategy := testutils.NewCreatePodWithPersistentVolumeWithFirstConsumerStrategy(gceVolumeFactory, basePod)
|
||||
nodeStrategy := testutils.NewLabelNodePrepareStrategy(v1.LabelZoneFailureDomain, "zone1")
|
||||
nodeStrategy := testutils.NewLabelNodePrepareStrategy(v1.LabelFailureDomainBetaZone, "zone1")
|
||||
for _, test := range tests {
|
||||
name := fmt.Sprintf("%vNodes/%vPods", test.nodes, test.existingPods)
|
||||
b.Run(name, func(b *testing.B) {
|
||||
@@ -218,7 +218,7 @@ func BenchmarkSchedulingPodAffinity(b *testing.B) {
|
||||
)
|
||||
// The test strategy creates pods with affinity for each other.
|
||||
testStrategy := testutils.NewCustomCreatePodStrategy(testBasePod)
|
||||
nodeStrategy := testutils.NewLabelNodePrepareStrategy(v1.LabelZoneFailureDomain, "zone1")
|
||||
nodeStrategy := testutils.NewLabelNodePrepareStrategy(v1.LabelFailureDomainBetaZone, "zone1")
|
||||
for _, test := range defaultTests {
|
||||
name := fmt.Sprintf("%vNodes/%vPods", test.nodes, test.existingPods)
|
||||
b.Run(name, func(b *testing.B) {
|
||||
@@ -278,10 +278,10 @@ func BenchmarkSchedulingPreferredPodAntiAffinity(b *testing.B) {
|
||||
// NodeAffinity rules when the cluster has various quantities of nodes and
|
||||
// scheduled pods.
|
||||
func BenchmarkSchedulingNodeAffinity(b *testing.B) {
|
||||
testBasePod := makeBasePodWithNodeAffinity(v1.LabelZoneFailureDomain, []string{"zone1", "zone2"})
|
||||
testBasePod := makeBasePodWithNodeAffinity(v1.LabelFailureDomainBetaZone, []string{"zone1", "zone2"})
|
||||
// The test strategy creates pods with node-affinity for each other.
|
||||
testStrategy := testutils.NewCustomCreatePodStrategy(testBasePod)
|
||||
nodeStrategy := testutils.NewLabelNodePrepareStrategy(v1.LabelZoneFailureDomain, "zone1")
|
||||
nodeStrategy := testutils.NewLabelNodePrepareStrategy(v1.LabelFailureDomainBetaZone, "zone1")
|
||||
for _, test := range defaultTests {
|
||||
name := fmt.Sprintf("%vNodes/%vPods", test.nodes, test.existingPods)
|
||||
b.Run(name, func(b *testing.B) {
|
||||
@@ -392,7 +392,7 @@ func makeBasePodWithPodAffinity(podLabels, affinityZoneLabels map[string]string)
|
||||
LabelSelector: &metav1.LabelSelector{
|
||||
MatchLabels: affinityZoneLabels,
|
||||
},
|
||||
TopologyKey: v1.LabelZoneFailureDomain,
|
||||
TopologyKey: v1.LabelFailureDomainBetaZone,
|
||||
Namespaces: []string{testNamespace, setupNamespace},
|
||||
},
|
||||
},
|
||||
@@ -587,7 +587,7 @@ func gceVolumeFactory(id int) *v1.PersistentVolume {
|
||||
{
|
||||
MatchExpressions: []v1.NodeSelectorRequirement{
|
||||
{
|
||||
Key: v1.LabelZoneFailureDomain,
|
||||
Key: v1.LabelFailureDomainBetaZone,
|
||||
Operator: v1.NodeSelectorOpIn,
|
||||
Values: []string{"zone1"},
|
||||
},
|
||||
|
Reference in New Issue
Block a user