Skip to content

Commit c7489b2

Browse files
authored
Merge pull request kubernetes#129750 from googs1025/scheduler/add_integration_for_queuesortplugin
feature: add scheduler queuesort plugins integration test
2 parents 569d189 + 8c80d38 commit c7489b2

File tree

4 files changed

+140
-26
lines changed

4 files changed

+140
-26
lines changed

test/integration/scheduler/eventhandler/eventhandler_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ func TestUpdateNodeEvent(t *testing.T) {
9898
}},
9999
})
100100

101-
testCtx, teardown := schedulerutils.InitTestSchedulerForFrameworkTest(t, testContext, 0,
101+
testCtx, teardown := schedulerutils.InitTestSchedulerForFrameworkTest(t, testContext, 0, true,
102102
scheduler.WithProfiles(cfg.Profiles...),
103103
scheduler.WithFrameworkOutOfTreeRegistry(registry),
104104
)

test/integration/scheduler/plugins/plugins_test.go

Lines changed: 129 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,8 @@ import (
2626
"testing"
2727
"time"
2828

29+
"github.com/google/go-cmp/cmp"
30+
2931
v1 "k8s.io/api/core/v1"
3032
"k8s.io/apimachinery/pkg/api/errors"
3133
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
@@ -38,6 +40,7 @@ import (
3840
clientset "k8s.io/client-go/kubernetes"
3941
listersv1 "k8s.io/client-go/listers/core/v1"
4042
featuregatetesting "k8s.io/component-base/featuregate/testing"
43+
corev1helpers "k8s.io/component-helpers/scheduling/corev1"
4144
configv1 "k8s.io/kube-scheduler/config/v1"
4245
"k8s.io/kubernetes/pkg/features"
4346
"k8s.io/kubernetes/pkg/scheduler"
@@ -75,6 +78,11 @@ func newPlugin(plugin framework.Plugin) frameworkruntime.PluginFactory {
7578
}
7679
}
7780

81+
type QueueSortPlugin struct {
82+
// lessFunc is used to compare two queued pod infos.
83+
lessFunc func(info1, info2 *framework.QueuedPodInfo) bool
84+
}
85+
7886
type PreEnqueuePlugin struct {
7987
called int
8088
admit bool
@@ -282,6 +290,7 @@ func (pp *PermitPlugin) deepCopy() *PermitPlugin {
282290
}
283291

284292
const (
293+
queuesortPluginName = "queuesort-plugin"
285294
enqueuePluginName = "enqueue-plugin"
286295
prefilterPluginName = "prefilter-plugin"
287296
postfilterPluginName = "postfilter-plugin"
@@ -308,6 +317,25 @@ var _ framework.PreBindPlugin = &PreBindPlugin{}
308317
var _ framework.BindPlugin = &BindPlugin{}
309318
var _ framework.PostBindPlugin = &PostBindPlugin{}
310319
var _ framework.PermitPlugin = &PermitPlugin{}
320+
var _ framework.QueueSortPlugin = &QueueSortPlugin{}
321+
322+
func (ep *QueueSortPlugin) Name() string {
323+
return queuesortPluginName
324+
}
325+
326+
func (ep *QueueSortPlugin) Less(info1, info2 *framework.QueuedPodInfo) bool {
327+
if ep.lessFunc != nil {
328+
return ep.lessFunc(info1, info2)
329+
}
330+
// If no custom less function is provided, default to return true.
331+
return true
332+
}
333+
334+
func NewQueueSortPlugin(lessFunc func(info1, info2 *framework.QueuedPodInfo) bool) *QueueSortPlugin {
335+
return &QueueSortPlugin{
336+
lessFunc: lessFunc,
337+
}
338+
}
311339

312340
func (ep *PreEnqueuePlugin) Name() string {
313341
return enqueuePluginName
@@ -668,7 +696,7 @@ func TestPreFilterPlugin(t *testing.T) {
668696
preFilterPlugin := &PreFilterPlugin{}
669697
registry, prof := initRegistryAndConfig(t, preFilterPlugin)
670698

671-
testCtx, teardown := schedulerutils.InitTestSchedulerForFrameworkTest(t, testContext, 2,
699+
testCtx, teardown := schedulerutils.InitTestSchedulerForFrameworkTest(t, testContext, 2, true,
672700
scheduler.WithProfiles(prof),
673701
scheduler.WithFrameworkOutOfTreeRegistry(registry))
674702
defer teardown()
@@ -705,6 +733,85 @@ func TestPreFilterPlugin(t *testing.T) {
705733
}
706734
}
707735

736+
// TestQueueSortPlugin tests invocation of queueSort plugins.
737+
func TestQueueSortPlugin(t *testing.T) {
738+
tests := []struct {
739+
name string
740+
podNames []string
741+
expectedOrder []string
742+
customLessFunc func(info1, info2 *framework.QueuedPodInfo) bool
743+
}{
744+
{
745+
name: "timestamp_sort_order",
746+
podNames: []string{"pod-1", "pod-2", "pod-3"},
747+
expectedOrder: []string{"pod-1", "pod-2", "pod-3"},
748+
customLessFunc: func(info1, info2 *framework.QueuedPodInfo) bool {
749+
return info1.Timestamp.Before(info2.Timestamp)
750+
},
751+
},
752+
{
753+
name: "priority_sort_order",
754+
podNames: []string{"pod-1", "pod-2", "pod-3"},
755+
expectedOrder: []string{"pod-3", "pod-2", "pod-1"}, // depends on pod priority
756+
customLessFunc: func(info1, info2 *framework.QueuedPodInfo) bool {
757+
p1 := corev1helpers.PodPriority(info1.Pod)
758+
p2 := corev1helpers.PodPriority(info2.Pod)
759+
return (p1 > p2) || (p1 == p2 && info1.Timestamp.Before(info2.Timestamp))
760+
},
761+
},
762+
}
763+
764+
for _, tt := range tests {
765+
t.Run(tt.name, func(t *testing.T) {
766+
queueSortPlugin := NewQueueSortPlugin(tt.customLessFunc)
767+
registry, prof := initRegistryAndConfig(t, queueSortPlugin)
768+
769+
testCtx, teardown := schedulerutils.InitTestSchedulerForFrameworkTest(t, testutils.InitTestAPIServer(t, "queuesort-plugin", nil), 2, false,
770+
scheduler.WithProfiles(prof),
771+
scheduler.WithFrameworkOutOfTreeRegistry(registry))
772+
defer teardown()
773+
774+
pods := make([]*v1.Pod, 0, len(tt.podNames))
775+
for i, name := range tt.podNames {
776+
// Create a pod with different priority.
777+
priority := int32(i + 1)
778+
pod, err := testutils.CreatePausePod(testCtx.ClientSet,
779+
testutils.InitPausePod(&testutils.PausePodConfig{Name: name, Namespace: testCtx.NS.Name, Priority: &priority}))
780+
if err != nil {
781+
t.Fatalf("Error while creating %v: %v", name, err)
782+
}
783+
pods = append(pods, pod)
784+
}
785+
786+
// Wait for all Pods to be in the scheduling queue.
787+
err := wait.PollUntilContextTimeout(testCtx.Ctx, time.Millisecond*200, wait.ForeverTestTimeout, false, func(ctx context.Context) (bool, error) {
788+
pendingPods, _ := testCtx.Scheduler.SchedulingQueue.PendingPods()
789+
if len(pendingPods) == len(pods) {
790+
t.Logf("All Pods are in the pending queue.")
791+
return true, nil
792+
}
793+
t.Logf("Waiting for all Pods to be in the scheduling queue. %d/%d", len(pendingPods), len(pods))
794+
return false, nil
795+
})
796+
if err != nil {
797+
t.Fatalf("Failed to observe all Pods in the scheduling queue: %v", err)
798+
}
799+
800+
actualOrder := make([]string, len(tt.expectedOrder))
801+
for i := 0; i < len(tt.expectedOrder); i++ {
802+
queueInfo := testutils.NextPodOrDie(t, testCtx)
803+
actualOrder[i] = queueInfo.Pod.Name
804+
t.Logf("Popped Pod %q", queueInfo.Pod.Name)
805+
}
806+
if diff := cmp.Diff(tt.expectedOrder, actualOrder); diff != "" {
807+
t.Errorf("Expected Pod order (-want,+got):\n%s", diff)
808+
} else {
809+
t.Logf("Pods were popped out in the expected order based on custom sorting logic.")
810+
}
811+
})
812+
}
813+
}
814+
708815
// TestPostFilterPlugin tests invocation of postFilter plugins.
709816
func TestPostFilterPlugin(t *testing.T) {
710817
numNodes := 1
@@ -848,7 +955,7 @@ func TestPostFilterPlugin(t *testing.T) {
848955
},
849956
}}})
850957

851-
testCtx, teardown := schedulerutils.InitTestSchedulerForFrameworkTest(t, testContext, int(tt.numNodes),
958+
testCtx, teardown := schedulerutils.InitTestSchedulerForFrameworkTest(t, testContext, int(tt.numNodes), true,
852959
scheduler.WithProfiles(cfg.Profiles...),
853960
scheduler.WithFrameworkOutOfTreeRegistry(registry),
854961
)
@@ -916,7 +1023,7 @@ func TestScorePlugin(t *testing.T) {
9161023
scorePlugin := &ScorePlugin{}
9171024
registry, prof := initRegistryAndConfig(t, scorePlugin)
9181025

919-
testCtx, teardown := schedulerutils.InitTestSchedulerForFrameworkTest(t, testContext, 10,
1026+
testCtx, teardown := schedulerutils.InitTestSchedulerForFrameworkTest(t, testContext, 10, true,
9201027
scheduler.WithProfiles(prof),
9211028
scheduler.WithFrameworkOutOfTreeRegistry(registry))
9221029
defer teardown()
@@ -960,7 +1067,7 @@ func TestNormalizeScorePlugin(t *testing.T) {
9601067
scoreWithNormalizePlugin := &ScoreWithNormalizePlugin{}
9611068
registry, prof := initRegistryAndConfig(t, scoreWithNormalizePlugin)
9621069

963-
testCtx, _ := schedulerutils.InitTestSchedulerForFrameworkTest(t, testutils.InitTestAPIServer(t, "score-plugin", nil), 10,
1070+
testCtx, _ := schedulerutils.InitTestSchedulerForFrameworkTest(t, testutils.InitTestAPIServer(t, "score-plugin", nil), 10, true,
9641071
scheduler.WithProfiles(prof),
9651072
scheduler.WithFrameworkOutOfTreeRegistry(registry))
9661073

@@ -1008,7 +1115,7 @@ func TestReservePluginReserve(t *testing.T) {
10081115
reservePlugin := &ReservePlugin{}
10091116
registry, prof := initRegistryAndConfig(t, reservePlugin)
10101117

1011-
testCtx, teardown := schedulerutils.InitTestSchedulerForFrameworkTest(t, testContext, 2,
1118+
testCtx, teardown := schedulerutils.InitTestSchedulerForFrameworkTest(t, testContext, 2, true,
10121119
scheduler.WithProfiles(prof),
10131120
scheduler.WithFrameworkOutOfTreeRegistry(registry))
10141121
defer teardown()
@@ -1123,7 +1230,7 @@ func TestPrebindPlugin(t *testing.T) {
11231230
},
11241231
})
11251232

1126-
testCtx, teardown := schedulerutils.InitTestSchedulerForFrameworkTest(t, testContext, nodesNum,
1233+
testCtx, teardown := schedulerutils.InitTestSchedulerForFrameworkTest(t, testContext, nodesNum, true,
11271234
scheduler.WithProfiles(cfg.Profiles...),
11281235
scheduler.WithFrameworkOutOfTreeRegistry(registry))
11291236
defer teardown()
@@ -1279,7 +1386,7 @@ func TestUnReserveReservePlugins(t *testing.T) {
12791386
}
12801387
registry, prof := initRegistryAndConfig(t, pls...)
12811388

1282-
testCtx, teardown := schedulerutils.InitTestSchedulerForFrameworkTest(t, testContext, 2,
1389+
testCtx, teardown := schedulerutils.InitTestSchedulerForFrameworkTest(t, testContext, 2, true,
12831390
scheduler.WithProfiles(prof),
12841391
scheduler.WithFrameworkOutOfTreeRegistry(registry))
12851392
defer teardown()
@@ -1373,7 +1480,7 @@ func TestUnReservePermitPlugins(t *testing.T) {
13731480
}
13741481
registry, profile := initRegistryAndConfig(t, []framework.Plugin{test.plugin, reservePlugin}...)
13751482

1376-
testCtx, teardown := schedulerutils.InitTestSchedulerForFrameworkTest(t, testContext, 2,
1483+
testCtx, teardown := schedulerutils.InitTestSchedulerForFrameworkTest(t, testContext, 2, true,
13771484
scheduler.WithProfiles(profile),
13781485
scheduler.WithFrameworkOutOfTreeRegistry(registry))
13791486
defer teardown()
@@ -1445,7 +1552,7 @@ func TestUnReservePreBindPlugins(t *testing.T) {
14451552
}
14461553
registry, profile := initRegistryAndConfig(t, []framework.Plugin{test.plugin, reservePlugin}...)
14471554

1448-
testCtx, teardown := schedulerutils.InitTestSchedulerForFrameworkTest(t, testContext, 2,
1555+
testCtx, teardown := schedulerutils.InitTestSchedulerForFrameworkTest(t, testContext, 2, true,
14491556
scheduler.WithProfiles(profile),
14501557
scheduler.WithFrameworkOutOfTreeRegistry(registry))
14511558
defer teardown()
@@ -1516,7 +1623,7 @@ func TestUnReserveBindPlugins(t *testing.T) {
15161623

15171624
test.plugin.client = testContext.ClientSet
15181625

1519-
testCtx, teardown := schedulerutils.InitTestSchedulerForFrameworkTest(t, testContext, 2,
1626+
testCtx, teardown := schedulerutils.InitTestSchedulerForFrameworkTest(t, testContext, 2, true,
15201627
scheduler.WithProfiles(profile),
15211628
scheduler.WithFrameworkOutOfTreeRegistry(registry))
15221629
defer teardown()
@@ -1663,7 +1770,7 @@ func TestBindPlugin(t *testing.T) {
16631770
}},
16641771
})
16651772

1666-
testCtx, teardown := schedulerutils.InitTestSchedulerForFrameworkTest(t, testContext, 2,
1773+
testCtx, teardown := schedulerutils.InitTestSchedulerForFrameworkTest(t, testContext, 2, true,
16671774
scheduler.WithProfiles(cfg.Profiles...),
16681775
scheduler.WithFrameworkOutOfTreeRegistry(registry),
16691776
)
@@ -1789,7 +1896,7 @@ func TestPostBindPlugin(t *testing.T) {
17891896
}
17901897

17911898
registry, prof := initRegistryAndConfig(t, preBindPlugin, postBindPlugin)
1792-
testCtx, teardown := schedulerutils.InitTestSchedulerForFrameworkTest(t, testContext, 2,
1899+
testCtx, teardown := schedulerutils.InitTestSchedulerForFrameworkTest(t, testContext, 2, true,
17931900
scheduler.WithProfiles(prof),
17941901
scheduler.WithFrameworkOutOfTreeRegistry(registry))
17951902
defer teardown()
@@ -1881,7 +1988,7 @@ func TestPermitPlugin(t *testing.T) {
18811988
perPlugin := &PermitPlugin{name: permitPluginName}
18821989
registry, prof := initRegistryAndConfig(t, perPlugin)
18831990

1884-
testCtx, teardown := schedulerutils.InitTestSchedulerForFrameworkTest(t, testContext, 2,
1991+
testCtx, teardown := schedulerutils.InitTestSchedulerForFrameworkTest(t, testContext, 2, true,
18851992
scheduler.WithProfiles(prof),
18861993
scheduler.WithFrameworkOutOfTreeRegistry(registry))
18871994
defer teardown()
@@ -1931,7 +2038,7 @@ func TestMultiplePermitPlugins(t *testing.T) {
19312038
registry, prof := initRegistryAndConfig(t, perPlugin1, perPlugin2)
19322039

19332040
// Create the API server and the scheduler with the test plugin set.
1934-
testCtx, _ := schedulerutils.InitTestSchedulerForFrameworkTest(t, testutils.InitTestAPIServer(t, "multi-permit-plugin", nil), 2,
2041+
testCtx, _ := schedulerutils.InitTestSchedulerForFrameworkTest(t, testutils.InitTestAPIServer(t, "multi-permit-plugin", nil), 2, true,
19352042
scheduler.WithProfiles(prof),
19362043
scheduler.WithFrameworkOutOfTreeRegistry(registry))
19372044

@@ -1983,7 +2090,7 @@ func TestPermitPluginsCancelled(t *testing.T) {
19832090
registry, prof := initRegistryAndConfig(t, perPlugin1, perPlugin2)
19842091

19852092
// Create the API server and the scheduler with the test plugin set.
1986-
testCtx, _ := schedulerutils.InitTestSchedulerForFrameworkTest(t, testutils.InitTestAPIServer(t, "permit-plugins", nil), 2,
2093+
testCtx, _ := schedulerutils.InitTestSchedulerForFrameworkTest(t, testutils.InitTestAPIServer(t, "permit-plugins", nil), 2, true,
19872094
scheduler.WithProfiles(prof),
19882095
scheduler.WithFrameworkOutOfTreeRegistry(registry))
19892096

@@ -2046,7 +2153,7 @@ func TestCoSchedulingWithPermitPlugin(t *testing.T) {
20462153
permitPlugin := &PermitPlugin{name: permitPluginName}
20472154
registry, prof := initRegistryAndConfig(t, permitPlugin)
20482155

2049-
testCtx, teardown := schedulerutils.InitTestSchedulerForFrameworkTest(t, testContext, 2,
2156+
testCtx, teardown := schedulerutils.InitTestSchedulerForFrameworkTest(t, testContext, 2, true,
20502157
scheduler.WithProfiles(prof),
20512158
scheduler.WithFrameworkOutOfTreeRegistry(registry))
20522159
defer teardown()
@@ -2128,7 +2235,7 @@ func TestFilterPlugin(t *testing.T) {
21282235
filterPlugin := &FilterPlugin{}
21292236
registry, prof := initRegistryAndConfig(t, filterPlugin)
21302237

2131-
testCtx, teardown := schedulerutils.InitTestSchedulerForFrameworkTest(t, testContext, 1,
2238+
testCtx, teardown := schedulerutils.InitTestSchedulerForFrameworkTest(t, testContext, 1, true,
21322239
scheduler.WithProfiles(prof),
21332240
scheduler.WithFrameworkOutOfTreeRegistry(registry))
21342241
defer teardown()
@@ -2185,7 +2292,7 @@ func TestPreScorePlugin(t *testing.T) {
21852292
preScorePlugin := &PreScorePlugin{}
21862293
registry, prof := initRegistryAndConfig(t, preScorePlugin)
21872294

2188-
testCtx, teardown := schedulerutils.InitTestSchedulerForFrameworkTest(t, testContext, 2,
2295+
testCtx, teardown := schedulerutils.InitTestSchedulerForFrameworkTest(t, testContext, 2, true,
21892296
scheduler.WithProfiles(prof),
21902297
scheduler.WithFrameworkOutOfTreeRegistry(registry))
21912298
defer teardown()
@@ -2245,7 +2352,7 @@ func TestPreEnqueuePlugin(t *testing.T) {
22452352
preFilterPlugin := &PreFilterPlugin{}
22462353
registry, prof := initRegistryAndConfig(t, enqueuePlugin, preFilterPlugin)
22472354

2248-
testCtx, teardown := schedulerutils.InitTestSchedulerForFrameworkTest(t, testContext, 1,
2355+
testCtx, teardown := schedulerutils.InitTestSchedulerForFrameworkTest(t, testContext, 1, true,
22492356
scheduler.WithProfiles(prof),
22502357
scheduler.WithFrameworkOutOfTreeRegistry(registry))
22512358
defer teardown()
@@ -2377,7 +2484,7 @@ func TestPreemptWithPermitPlugin(t *testing.T) {
23772484
},
23782485
})
23792486

2380-
testCtx, teardown := schedulerutils.InitTestSchedulerForFrameworkTest(t, testContext, 0,
2487+
testCtx, teardown := schedulerutils.InitTestSchedulerForFrameworkTest(t, testContext, 0, true,
23812488
scheduler.WithProfiles(cfg.Profiles...),
23822489
scheduler.WithFrameworkOutOfTreeRegistry(registry),
23832490
)
@@ -2557,7 +2664,7 @@ func TestActivatePods(t *testing.T) {
25572664
})
25582665

25592666
// Create the API server and the scheduler with the test plugin set.
2560-
testCtx, _ := schedulerutils.InitTestSchedulerForFrameworkTest(t, testutils.InitTestAPIServer(t, "job-plugin", nil), 1,
2667+
testCtx, _ := schedulerutils.InitTestSchedulerForFrameworkTest(t, testutils.InitTestAPIServer(t, "job-plugin", nil), 1, true,
25612668
scheduler.WithProfiles(cfg.Profiles...),
25622669
scheduler.WithFrameworkOutOfTreeRegistry(registry))
25632670

@@ -2730,7 +2837,7 @@ func TestPreEnqueuePluginEventsToRegister(t *testing.T) {
27302837
}},
27312838
})
27322839

2733-
testCtx, teardown := schedulerutils.InitTestSchedulerForFrameworkTest(t, testContext, 2,
2840+
testCtx, teardown := schedulerutils.InitTestSchedulerForFrameworkTest(t, testContext, 2, true,
27342841
scheduler.WithProfiles(cfg.Profiles...),
27352842
scheduler.WithFrameworkOutOfTreeRegistry(registry),
27362843
)

test/integration/scheduler/rescheduling_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -205,7 +205,7 @@ func TestReScheduling(t *testing.T) {
205205
// Create a plugin registry for testing. Register only a permit plugin.
206206
registry, prof := InitRegistryAndConfig(t, nil, test.plugins...)
207207

208-
testCtx, teardown := InitTestSchedulerForFrameworkTest(t, testContext, 2,
208+
testCtx, teardown := InitTestSchedulerForFrameworkTest(t, testContext, 2, true,
209209
scheduler.WithProfiles(prof),
210210
scheduler.WithFrameworkOutOfTreeRegistry(registry))
211211
defer teardown()

test/integration/scheduler/util.go

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@ import (
3131
configtesting "k8s.io/kubernetes/pkg/scheduler/apis/config/testing"
3232
"k8s.io/kubernetes/pkg/scheduler/framework"
3333
"k8s.io/kubernetes/pkg/scheduler/framework/plugins/defaultbinder"
34+
"k8s.io/kubernetes/pkg/scheduler/framework/plugins/queuesort"
3435
frameworkruntime "k8s.io/kubernetes/pkg/scheduler/framework/runtime"
3536
st "k8s.io/kubernetes/pkg/scheduler/testing"
3637
testutils "k8s.io/kubernetes/test/integration/util"
@@ -44,10 +45,12 @@ import (
4445
// This should only be called when you want to kill the scheduler alone, away from apiserver.
4546
// For example, in scheduler integration tests, recreating apiserver is performance consuming,
4647
// then shutdown the scheduler and recreate it between each test case is a better approach.
47-
func InitTestSchedulerForFrameworkTest(t *testing.T, testCtx *testutils.TestContext, nodeCount int, opts ...scheduler.Option) (*testutils.TestContext, testutils.ShutdownFunc) {
48+
func InitTestSchedulerForFrameworkTest(t *testing.T, testCtx *testutils.TestContext, nodeCount int, runScheduler bool, opts ...scheduler.Option) (*testutils.TestContext, testutils.ShutdownFunc) {
4849
testCtx = testutils.InitTestSchedulerWithOptions(t, testCtx, 0, opts...)
4950
testutils.SyncSchedulerInformerFactory(testCtx)
50-
go testCtx.Scheduler.Run(testCtx.SchedulerCtx)
51+
if runScheduler {
52+
go testCtx.Scheduler.Run(testCtx.SchedulerCtx)
53+
}
5154

5255
if nodeCount > 0 {
5356
if _, err := testutils.CreateAndWaitForNodesInCache(testCtx, "test-node", st.MakeNode(), nodeCount); err != nil {
@@ -105,6 +108,10 @@ func InitRegistryAndConfig(t *testing.T, factory func(plugin framework.Plugin) f
105108
plugin := configv1.Plugin{Name: p.Name()}
106109

107110
switch p.(type) {
111+
case framework.QueueSortPlugin:
112+
pls.QueueSort.Enabled = append(pls.QueueSort.Enabled, plugin)
113+
// It's intentional to disable the PrioritySort plugin.
114+
pls.QueueSort.Disabled = []configv1.Plugin{{Name: queuesort.Name}}
108115
case framework.PreEnqueuePlugin:
109116
pls.PreEnqueue.Enabled = append(pls.PreEnqueue.Enabled, plugin)
110117
case framework.PreFilterPlugin:

0 commit comments

Comments
 (0)