Skip to content

Commit 5da37d5

Browse files
committed
Fix a scheduler e2e bug on PodTopologySpread scoring
1 parent f6525db commit 5da37d5

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

test/e2e/scheduling/priorities.go

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -378,7 +378,7 @@ var _ = SIGDescribe("SchedulerPriorities [Serial]", func() {
378378
PodConfig: pausePodConfig{
379379
Name: podLabel,
380380
Namespace: ns,
381-
Labels: map[string]string{podLabel: ""},
381+
Labels: map[string]string{podLabel: "foo"},
382382
NodeSelector: map[string]string{topologyKey: nodeNames[0]},
383383
},
384384
}
@@ -388,7 +388,9 @@ var _ = SIGDescribe("SchedulerPriorities [Serial]", func() {
388388
podCfg := pausePodConfig{
389389
Name: "test-pod",
390390
Namespace: ns,
391-
Labels: map[string]string{podLabel: ""},
391+
// The labels shouldn't match the preceding ReplicaSet, otherwise it will
392+
// be claimed as orphan of the ReplicaSet.
393+
Labels: map[string]string{podLabel: "bar"},
392394
Affinity: &v1.Affinity{
393395
NodeAffinity: &v1.NodeAffinity{
394396
RequiredDuringSchedulingIgnoredDuringExecution: &v1.NodeSelector{

0 commit comments

Comments
 (0)