@@ -96,7 +96,6 @@ func TestCompatibility_v1_Scheduler(t *testing.T) {
96
96
"TestLabelsPresence" ,
97
97
),
98
98
wantPrioritizers : sets .NewString (
99
- "LeastRequestedPriority" ,
100
99
"ServiceSpreadingPriority" ,
101
100
"TestServiceAntiAffinity" ,
102
101
"TestLabelPreference" ,
@@ -109,6 +108,9 @@ func TestCompatibility_v1_Scheduler(t *testing.T) {
109
108
{Name : "VolumeRestrictions" },
110
109
{Name : "TaintToleration" },
111
110
},
111
+ "ScorePlugin" : {
112
+ {Name : "NodeResourcesLeastAllocated" , Weight : 1 },
113
+ },
112
114
},
113
115
},
114
116
@@ -141,8 +143,6 @@ func TestCompatibility_v1_Scheduler(t *testing.T) {
141
143
),
142
144
wantPrioritizers : sets .NewString (
143
145
"EqualPriority" ,
144
- "LeastRequestedPriority" ,
145
- "BalancedResourceAllocation" ,
146
146
"SelectorSpreadPriority" ,
147
147
"TestServiceAntiAffinity" ,
148
148
"TestLabelPreference" ,
@@ -157,6 +157,10 @@ func TestCompatibility_v1_Scheduler(t *testing.T) {
157
157
{Name : "VolumeRestrictions" },
158
158
{Name : "TaintToleration" },
159
159
},
160
+ "ScorePlugin" : {
161
+ {Name : "NodeResourcesBalancedAllocation" , Weight : 2 },
162
+ {Name : "NodeResourcesLeastAllocated" , Weight : 2 },
163
+ },
160
164
},
161
165
},
162
166
@@ -198,8 +202,6 @@ func TestCompatibility_v1_Scheduler(t *testing.T) {
198
202
),
199
203
wantPrioritizers : sets .NewString (
200
204
"EqualPriority" ,
201
- "LeastRequestedPriority" ,
202
- "BalancedResourceAllocation" ,
203
205
"SelectorSpreadPriority" ,
204
206
"TestServiceAntiAffinity" ,
205
207
"TestLabelPreference" ,
@@ -216,7 +218,9 @@ func TestCompatibility_v1_Scheduler(t *testing.T) {
216
218
{Name : "VolumeZone" },
217
219
},
218
220
"ScorePlugin" : {
221
+ {Name : "NodeResourcesBalancedAllocation" , Weight : 2 },
219
222
{Name : "ImageLocality" , Weight : 2 },
223
+ {Name : "NodeResourcesLeastAllocated" , Weight : 2 },
220
224
{Name : "NodeAffinity" , Weight : 2 },
221
225
},
222
226
},
@@ -264,8 +268,6 @@ func TestCompatibility_v1_Scheduler(t *testing.T) {
264
268
),
265
269
wantPrioritizers : sets .NewString (
266
270
"EqualPriority" ,
267
- "LeastRequestedPriority" ,
268
- "BalancedResourceAllocation" ,
269
271
"SelectorSpreadPriority" ,
270
272
"InterPodAffinityPriority" ,
271
273
),
@@ -282,7 +284,9 @@ func TestCompatibility_v1_Scheduler(t *testing.T) {
282
284
{Name : "InterPodAffinity" },
283
285
},
284
286
"ScorePlugin" : {
287
+ {Name : "NodeResourcesBalancedAllocation" , Weight : 2 },
285
288
{Name : "ImageLocality" , Weight : 2 },
289
+ {Name : "NodeResourcesLeastAllocated" , Weight : 2 },
286
290
{Name : "NodeAffinity" , Weight : 2 },
287
291
{Name : "TaintToleration" , Weight : 2 },
288
292
},
@@ -335,11 +339,8 @@ func TestCompatibility_v1_Scheduler(t *testing.T) {
335
339
),
336
340
wantPrioritizers : sets .NewString (
337
341
"EqualPriority" ,
338
- "LeastRequestedPriority" ,
339
- "BalancedResourceAllocation" ,
340
342
"SelectorSpreadPriority" ,
341
343
"InterPodAffinityPriority" ,
342
- "MostRequestedPriority" ,
343
344
),
344
345
wantPlugins : map [string ][]kubeschedulerconfig.Plugin {
345
346
"FilterPlugin" : {
@@ -354,7 +355,10 @@ func TestCompatibility_v1_Scheduler(t *testing.T) {
354
355
{Name : "InterPodAffinity" },
355
356
},
356
357
"ScorePlugin" : {
358
+ {Name : "NodeResourcesBalancedAllocation" , Weight : 2 },
357
359
{Name : "ImageLocality" , Weight : 2 },
360
+ {Name : "NodeResourcesLeastAllocated" , Weight : 2 },
361
+ {Name : "NodeResourcesMostAllocated" , Weight : 2 },
358
362
{Name : "NodeAffinity" , Weight : 2 },
359
363
{Name : "NodePreferAvoidPods" , Weight : 2 },
360
364
{Name : "TaintToleration" , Weight : 2 },
@@ -417,11 +421,8 @@ func TestCompatibility_v1_Scheduler(t *testing.T) {
417
421
),
418
422
wantPrioritizers : sets .NewString (
419
423
"EqualPriority" ,
420
- "LeastRequestedPriority" ,
421
- "BalancedResourceAllocation" ,
422
424
"SelectorSpreadPriority" ,
423
425
"InterPodAffinityPriority" ,
424
- "MostRequestedPriority" ,
425
426
),
426
427
wantPlugins : map [string ][]kubeschedulerconfig.Plugin {
427
428
"FilterPlugin" : {
@@ -436,7 +437,10 @@ func TestCompatibility_v1_Scheduler(t *testing.T) {
436
437
{Name : "InterPodAffinity" },
437
438
},
438
439
"ScorePlugin" : {
440
+ {Name : "NodeResourcesBalancedAllocation" , Weight : 2 },
439
441
{Name : "ImageLocality" , Weight : 2 },
442
+ {Name : "NodeResourcesLeastAllocated" , Weight : 2 },
443
+ {Name : "NodeResourcesMostAllocated" , Weight : 2 },
440
444
{Name : "NodeAffinity" , Weight : 2 },
441
445
{Name : "NodePreferAvoidPods" , Weight : 2 },
442
446
{Name : "TaintToleration" , Weight : 2 },
@@ -512,11 +516,8 @@ func TestCompatibility_v1_Scheduler(t *testing.T) {
512
516
),
513
517
wantPrioritizers : sets .NewString (
514
518
"EqualPriority" ,
515
- "LeastRequestedPriority" ,
516
- "BalancedResourceAllocation" ,
517
519
"SelectorSpreadPriority" ,
518
520
"InterPodAffinityPriority" ,
519
- "MostRequestedPriority" ,
520
521
),
521
522
wantPlugins : map [string ][]kubeschedulerconfig.Plugin {
522
523
"FilterPlugin" : {
@@ -531,7 +532,10 @@ func TestCompatibility_v1_Scheduler(t *testing.T) {
531
532
{Name : "InterPodAffinity" },
532
533
},
533
534
"ScorePlugin" : {
535
+ {Name : "NodeResourcesBalancedAllocation" , Weight : 2 },
534
536
{Name : "ImageLocality" , Weight : 2 },
537
+ {Name : "NodeResourcesLeastAllocated" , Weight : 2 },
538
+ {Name : "NodeResourcesMostAllocated" , Weight : 2 },
535
539
{Name : "NodeAffinity" , Weight : 2 },
536
540
{Name : "NodePreferAvoidPods" , Weight : 2 },
537
541
{Name : "TaintToleration" , Weight : 2 },
@@ -608,11 +612,8 @@ func TestCompatibility_v1_Scheduler(t *testing.T) {
608
612
),
609
613
wantPrioritizers : sets .NewString (
610
614
"EqualPriority" ,
611
- "LeastRequestedPriority" ,
612
- "BalancedResourceAllocation" ,
613
615
"SelectorSpreadPriority" ,
614
616
"InterPodAffinityPriority" ,
615
- "MostRequestedPriority" ,
616
617
),
617
618
wantPlugins : map [string ][]kubeschedulerconfig.Plugin {
618
619
"FilterPlugin" : {
@@ -628,7 +629,10 @@ func TestCompatibility_v1_Scheduler(t *testing.T) {
628
629
{Name : "InterPodAffinity" },
629
630
},
630
631
"ScorePlugin" : {
632
+ {Name : "NodeResourcesBalancedAllocation" , Weight : 2 },
631
633
{Name : "ImageLocality" , Weight : 2 },
634
+ {Name : "NodeResourcesLeastAllocated" , Weight : 2 },
635
+ {Name : "NodeResourcesMostAllocated" , Weight : 2 },
632
636
{Name : "NodeAffinity" , Weight : 2 },
633
637
{Name : "NodePreferAvoidPods" , Weight : 2 },
634
638
{Name : "TaintToleration" , Weight : 2 },
@@ -710,11 +714,8 @@ func TestCompatibility_v1_Scheduler(t *testing.T) {
710
714
),
711
715
wantPrioritizers : sets .NewString (
712
716
"EqualPriority" ,
713
- "LeastRequestedPriority" ,
714
- "BalancedResourceAllocation" ,
715
717
"SelectorSpreadPriority" ,
716
718
"InterPodAffinityPriority" ,
717
- "MostRequestedPriority" ,
718
719
),
719
720
wantPlugins : map [string ][]kubeschedulerconfig.Plugin {
720
721
"FilterPlugin" : {
@@ -730,7 +731,10 @@ func TestCompatibility_v1_Scheduler(t *testing.T) {
730
731
{Name : "InterPodAffinity" },
731
732
},
732
733
"ScorePlugin" : {
734
+ {Name : "NodeResourcesBalancedAllocation" , Weight : 2 },
733
735
{Name : "ImageLocality" , Weight : 2 },
736
+ {Name : "NodeResourcesLeastAllocated" , Weight : 2 },
737
+ {Name : "NodeResourcesMostAllocated" , Weight : 2 },
734
738
{Name : "NodeAffinity" , Weight : 2 },
735
739
{Name : "NodePreferAvoidPods" , Weight : 2 },
736
740
{Name : "TaintToleration" , Weight : 2 },
@@ -824,11 +828,8 @@ func TestCompatibility_v1_Scheduler(t *testing.T) {
824
828
),
825
829
wantPrioritizers : sets .NewString (
826
830
"EqualPriority" ,
827
- "LeastRequestedPriority" ,
828
- "BalancedResourceAllocation" ,
829
831
"SelectorSpreadPriority" ,
830
832
"InterPodAffinityPriority" ,
831
- "MostRequestedPriority" ,
832
833
"RequestedToCapacityRatioPriority" ,
833
834
),
834
835
wantPlugins : map [string ][]kubeschedulerconfig.Plugin {
@@ -845,7 +846,10 @@ func TestCompatibility_v1_Scheduler(t *testing.T) {
845
846
{Name : "InterPodAffinity" },
846
847
},
847
848
"ScorePlugin" : {
849
+ {Name : "NodeResourcesBalancedAllocation" , Weight : 2 },
848
850
{Name : "ImageLocality" , Weight : 2 },
851
+ {Name : "NodeResourcesLeastAllocated" , Weight : 2 },
852
+ {Name : "NodeResourcesMostAllocated" , Weight : 2 },
849
853
{Name : "NodeAffinity" , Weight : 2 },
850
854
{Name : "NodePreferAvoidPods" , Weight : 2 },
851
855
{Name : "TaintToleration" , Weight : 2 },
@@ -940,11 +944,8 @@ func TestCompatibility_v1_Scheduler(t *testing.T) {
940
944
),
941
945
wantPrioritizers : sets .NewString (
942
946
"EqualPriority" ,
943
- "LeastRequestedPriority" ,
944
- "BalancedResourceAllocation" ,
945
947
"SelectorSpreadPriority" ,
946
948
"InterPodAffinityPriority" ,
947
- "MostRequestedPriority" ,
948
949
"RequestedToCapacityRatioPriority" ,
949
950
),
950
951
wantPlugins : map [string ][]kubeschedulerconfig.Plugin {
@@ -962,7 +963,10 @@ func TestCompatibility_v1_Scheduler(t *testing.T) {
962
963
{Name : "InterPodAffinity" },
963
964
},
964
965
"ScorePlugin" : {
966
+ {Name : "NodeResourcesBalancedAllocation" , Weight : 2 },
965
967
{Name : "ImageLocality" , Weight : 2 },
968
+ {Name : "NodeResourcesLeastAllocated" , Weight : 2 },
969
+ {Name : "NodeResourcesMostAllocated" , Weight : 2 },
966
970
{Name : "NodeAffinity" , Weight : 2 },
967
971
{Name : "NodePreferAvoidPods" , Weight : 2 },
968
972
{Name : "TaintToleration" , Weight : 2 },
@@ -1057,11 +1061,8 @@ func TestCompatibility_v1_Scheduler(t *testing.T) {
1057
1061
),
1058
1062
wantPrioritizers : sets .NewString (
1059
1063
"EqualPriority" ,
1060
- "LeastRequestedPriority" ,
1061
- "BalancedResourceAllocation" ,
1062
1064
"SelectorSpreadPriority" ,
1063
1065
"InterPodAffinityPriority" ,
1064
- "MostRequestedPriority" ,
1065
1066
"RequestedToCapacityRatioPriority" ,
1066
1067
),
1067
1068
wantPlugins : map [string ][]kubeschedulerconfig.Plugin {
@@ -1079,7 +1080,10 @@ func TestCompatibility_v1_Scheduler(t *testing.T) {
1079
1080
{Name : "InterPodAffinity" },
1080
1081
},
1081
1082
"ScorePlugin" : {
1083
+ {Name : "NodeResourcesBalancedAllocation" , Weight : 2 },
1082
1084
{Name : "ImageLocality" , Weight : 2 },
1085
+ {Name : "NodeResourcesLeastAllocated" , Weight : 2 },
1086
+ {Name : "NodeResourcesMostAllocated" , Weight : 2 },
1083
1087
{Name : "NodeAffinity" , Weight : 2 },
1084
1088
{Name : "NodePreferAvoidPods" , Weight : 2 },
1085
1089
{Name : "TaintToleration" , Weight : 2 },
@@ -1178,11 +1182,8 @@ func TestCompatibility_v1_Scheduler(t *testing.T) {
1178
1182
),
1179
1183
wantPrioritizers : sets .NewString (
1180
1184
"EqualPriority" ,
1181
- "LeastRequestedPriority" ,
1182
- "BalancedResourceAllocation" ,
1183
1185
"SelectorSpreadPriority" ,
1184
1186
"InterPodAffinityPriority" ,
1185
- "MostRequestedPriority" ,
1186
1187
"RequestedToCapacityRatioPriority" ,
1187
1188
),
1188
1189
wantPlugins : map [string ][]kubeschedulerconfig.Plugin {
@@ -1200,7 +1201,10 @@ func TestCompatibility_v1_Scheduler(t *testing.T) {
1200
1201
{Name : "InterPodAffinity" },
1201
1202
},
1202
1203
"ScorePlugin" : {
1204
+ {Name : "NodeResourcesBalancedAllocation" , Weight : 2 },
1203
1205
{Name : "ImageLocality" , Weight : 2 },
1206
+ {Name : "NodeResourcesLeastAllocated" , Weight : 2 },
1207
+ {Name : "NodeResourcesMostAllocated" , Weight : 2 },
1204
1208
{Name : "NodeAffinity" , Weight : 2 },
1205
1209
{Name : "NodePreferAvoidPods" , Weight : 2 },
1206
1210
{Name : "TaintToleration" , Weight : 2 },
@@ -1241,10 +1245,13 @@ func TestCompatibility_v1_Scheduler(t *testing.T) {
1241
1245
"InterPodAffinity" : "MatchInterPodAffinity" ,
1242
1246
}
1243
1247
scoreToPriorityMap := map [string ]string {
1244
- "ImageLocality" : "ImageLocalityPriority" ,
1245
- "NodeAffinity" : "NodeAffinityPriority" ,
1246
- "NodePreferAvoidPods" : "NodePreferAvoidPodsPriority" ,
1247
- "TaintToleration" : "TaintTolerationPriority" ,
1248
+ "ImageLocality" : "ImageLocalityPriority" ,
1249
+ "NodeAffinity" : "NodeAffinityPriority" ,
1250
+ "NodePreferAvoidPods" : "NodePreferAvoidPodsPriority" ,
1251
+ "TaintToleration" : "TaintTolerationPriority" ,
1252
+ "NodeResourcesLeastAllocated" : "LeastRequestedPriority" ,
1253
+ "NodeResourcesBalancedAllocation" : "BalancedResourceAllocation" ,
1254
+ "NodeResourcesMostAllocated" : "MostRequestedPriority" ,
1248
1255
}
1249
1256
1250
1257
for v , tc := range schedulerFiles {
0 commit comments