Fix labels for spreading benchmark

Nodes where being created with beta zone label, whereas the service was using stable.

Change-Id: I08ba1b6c083217759524236bde3888e527b4a44f
This commit is contained in:
Aldo Culquicondor 2020-10-21 15:51:44 -04:00
parent 161df49979
commit 15d2ab1615
2 changed files with 3 additions and 3 deletions

View File

@ -1076,7 +1076,7 @@ func BenchmarkFilter(b *testing.B) {
{
name: "1000nodes/single-constraint-zone",
pod: st.MakePod().Name("p").Label("foo", "").
SpreadConstraint(1, v1.LabelZoneFailureDomain, v1.DoNotSchedule, st.MakeLabelSelector().Exists("foo").Obj()).
SpreadConstraint(1, v1.LabelZoneFailureDomainStable, v1.DoNotSchedule, st.MakeLabelSelector().Exists("foo").Obj()).
Obj(),
existingPodsNum: 10000,
allNodesNum: 1000,
@ -1094,7 +1094,7 @@ func BenchmarkFilter(b *testing.B) {
{
name: "1000nodes/two-Constraints-zone-node",
pod: st.MakePod().Name("p").Label("foo", "").Label("bar", "").
SpreadConstraint(1, v1.LabelZoneFailureDomain, v1.DoNotSchedule, st.MakeLabelSelector().Exists("foo").Obj()).
SpreadConstraint(1, v1.LabelZoneFailureDomainStable, v1.DoNotSchedule, st.MakeLabelSelector().Exists("foo").Obj()).
SpreadConstraint(1, v1.LabelHostname, v1.DoNotSchedule, st.MakeLabelSelector().Exists("bar").Obj()).
Obj(),
existingPodsNum: 10000,

View File

@ -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.LabelZoneFailureDomain, fmt.Sprintf("zone%d", i%zones)).
Label(v1.LabelZoneFailureDomainStable, fmt.Sprintf("zone%d", i%zones)).
Label(v1.LabelHostname, fmt.Sprintf("node%d", i)).Obj()
allNodes = append(allNodes, node)
}