Skip to content

Commit 15d2ab1

Browse files
Fix labels for spreading benchmark
Nodes where being created with beta zone label, whereas the service was using stable. Change-Id: I08ba1b6c083217759524236bde3888e527b4a44f
1 parent 161df49 commit 15d2ab1

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

pkg/scheduler/framework/plugins/podtopologyspread/filtering_test.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1076,7 +1076,7 @@ func BenchmarkFilter(b *testing.B) {
10761076
{
10771077
name: "1000nodes/single-constraint-zone",
10781078
pod: st.MakePod().Name("p").Label("foo", "").
1079-
SpreadConstraint(1, v1.LabelZoneFailureDomain, v1.DoNotSchedule, st.MakeLabelSelector().Exists("foo").Obj()).
1079+
SpreadConstraint(1, v1.LabelZoneFailureDomainStable, v1.DoNotSchedule, st.MakeLabelSelector().Exists("foo").Obj()).
10801080
Obj(),
10811081
existingPodsNum: 10000,
10821082
allNodesNum: 1000,
@@ -1094,7 +1094,7 @@ func BenchmarkFilter(b *testing.B) {
10941094
{
10951095
name: "1000nodes/two-Constraints-zone-node",
10961096
pod: st.MakePod().Name("p").Label("foo", "").Label("bar", "").
1097-
SpreadConstraint(1, v1.LabelZoneFailureDomain, v1.DoNotSchedule, st.MakeLabelSelector().Exists("foo").Obj()).
1097+
SpreadConstraint(1, v1.LabelZoneFailureDomainStable, v1.DoNotSchedule, st.MakeLabelSelector().Exists("foo").Obj()).
10981098
SpreadConstraint(1, v1.LabelHostname, v1.DoNotSchedule, st.MakeLabelSelector().Exists("bar").Obj()).
10991099
Obj(),
11001100
existingPodsNum: 10000,

pkg/scheduler/testing/workload_prep.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ func MakeNodesAndPodsForEvenPodsSpread(labels map[string]string, existingPodsNum
4444
// build nodes
4545
for i := 0; i < allNodesNum; i++ {
4646
node := MakeNode().Name(fmt.Sprintf("node%d", i)).
47-
Label(v1.LabelZoneFailureDomain, fmt.Sprintf("zone%d", i%zones)).
47+
Label(v1.LabelZoneFailureDomainStable, fmt.Sprintf("zone%d", i%zones)).
4848
Label(v1.LabelHostname, fmt.Sprintf("node%d", i)).Obj()
4949
allNodes = append(allNodes, node)
5050
}

0 commit comments

Comments
 (0)