@@ -39,15 +39,15 @@ type framework struct {
39
39
waitingPods * waitingPodsMap
40
40
pluginNameToWeightMap map [string ]int
41
41
queueSortPlugins []QueueSortPlugin
42
- prefilterPlugins []PrefilterPlugin
42
+ preFilterPlugins []PreFilterPlugin
43
43
filterPlugins []FilterPlugin
44
44
postFilterPlugins []PostFilterPlugin
45
45
scorePlugins []ScorePlugin
46
46
scoreWithNormalizePlugins []ScoreWithNormalizePlugin
47
47
reservePlugins []ReservePlugin
48
- prebindPlugins []PrebindPlugin
48
+ preBindPlugins []PreBindPlugin
49
49
bindPlugins []BindPlugin
50
- postbindPlugins []PostbindPlugin
50
+ postBindPlugins []PostBindPlugin
51
51
unreservePlugins []UnreservePlugin
52
52
permitPlugins []PermitPlugin
53
53
}
@@ -105,11 +105,11 @@ func NewFramework(r Registry, plugins *config.Plugins, args []config.PluginConfi
105
105
if plugins .PreFilter != nil {
106
106
for _ , pf := range plugins .PreFilter .Enabled {
107
107
if pg , ok := pluginsMap [pf .Name ]; ok {
108
- p , ok := pg .(PrefilterPlugin )
108
+ p , ok := pg .(PreFilterPlugin )
109
109
if ! ok {
110
110
return nil , fmt .Errorf ("plugin %q does not extend prefilter plugin" , pf .Name )
111
111
}
112
- f .prefilterPlugins = append (f .prefilterPlugins , p )
112
+ f .preFilterPlugins = append (f .preFilterPlugins , p )
113
113
} else {
114
114
return nil , fmt .Errorf ("prefilter plugin %q does not exist" , pf .Name )
115
115
}
@@ -186,11 +186,11 @@ func NewFramework(r Registry, plugins *config.Plugins, args []config.PluginConfi
186
186
if plugins .PreBind != nil {
187
187
for _ , pb := range plugins .PreBind .Enabled {
188
188
if pg , ok := pluginsMap [pb .Name ]; ok {
189
- p , ok := pg .(PrebindPlugin )
189
+ p , ok := pg .(PreBindPlugin )
190
190
if ! ok {
191
191
return nil , fmt .Errorf ("plugin %q does not extend prebind plugin" , pb .Name )
192
192
}
193
- f .prebindPlugins = append (f .prebindPlugins , p )
193
+ f .preBindPlugins = append (f .preBindPlugins , p )
194
194
} else {
195
195
return nil , fmt .Errorf ("prebind plugin %q does not exist" , pb .Name )
196
196
}
@@ -214,11 +214,11 @@ func NewFramework(r Registry, plugins *config.Plugins, args []config.PluginConfi
214
214
if plugins .PostBind != nil {
215
215
for _ , pb := range plugins .PostBind .Enabled {
216
216
if pg , ok := pluginsMap [pb .Name ]; ok {
217
- p , ok := pg .(PostbindPlugin )
217
+ p , ok := pg .(PostBindPlugin )
218
218
if ! ok {
219
219
return nil , fmt .Errorf ("plugin %q does not extend postbind plugin" , pb .Name )
220
220
}
221
- f .postbindPlugins = append (f .postbindPlugins , p )
221
+ f .postBindPlugins = append (f .postBindPlugins , p )
222
222
} else {
223
223
return nil , fmt .Errorf ("postbind plugin %q does not exist" , pb .Name )
224
224
}
@@ -283,14 +283,14 @@ func (f *framework) QueueSortFunc() LessFunc {
283
283
return f .queueSortPlugins [0 ].Less
284
284
}
285
285
286
- // RunPrefilterPlugins runs the set of configured prefilter plugins. It returns
286
+ // RunPreFilterPlugins runs the set of configured PreFilter plugins. It returns
287
287
// *Status and its code is set to non-success if any of the plugins returns
288
288
// anything but Success. If a non-success status is returned, then the scheduling
289
289
// cycle is aborted.
290
- func (f * framework ) RunPrefilterPlugins (
290
+ func (f * framework ) RunPreFilterPlugins (
291
291
pc * PluginContext , pod * v1.Pod ) * Status {
292
- for _ , pl := range f .prefilterPlugins {
293
- status := pl .Prefilter (pc , pod )
292
+ for _ , pl := range f .preFilterPlugins {
293
+ status := pl .PreFilter (pc , pod )
294
294
if ! status .IsSuccess () {
295
295
if status .Code () == Unschedulable {
296
296
msg := fmt .Sprintf ("rejected by %q at prefilter: %v" , pl .Name (), status .Message ())
@@ -425,13 +425,13 @@ func (f *framework) RunScorePlugins(pc *PluginContext, pod *v1.Pod, nodes []*v1.
425
425
return pluginToNodeScores , nil
426
426
}
427
427
428
- // RunPrebindPlugins runs the set of configured prebind plugins. It returns a
428
+ // RunPreBindPlugins runs the set of configured prebind plugins. It returns a
429
429
// failure (bool) if any of the plugins returns an error. It also returns an
430
430
// error containing the rejection message or the error occurred in the plugin.
431
- func (f * framework ) RunPrebindPlugins (
431
+ func (f * framework ) RunPreBindPlugins (
432
432
pc * PluginContext , pod * v1.Pod , nodeName string ) * Status {
433
- for _ , pl := range f .prebindPlugins {
434
- status := pl .Prebind (pc , pod , nodeName )
433
+ for _ , pl := range f .preBindPlugins {
434
+ status := pl .PreBind (pc , pod , nodeName )
435
435
if ! status .IsSuccess () {
436
436
if status .Code () == Unschedulable {
437
437
msg := fmt .Sprintf ("rejected by %q at prebind: %v" , pl .Name (), status .Message ())
@@ -467,11 +467,11 @@ func (f *framework) RunBindPlugins(pc *PluginContext, pod *v1.Pod, nodeName stri
467
467
return status
468
468
}
469
469
470
- // RunPostbindPlugins runs the set of configured postbind plugins.
471
- func (f * framework ) RunPostbindPlugins (
470
+ // RunPostBindPlugins runs the set of configured postbind plugins.
471
+ func (f * framework ) RunPostBindPlugins (
472
472
pc * PluginContext , pod * v1.Pod , nodeName string ) {
473
- for _ , pl := range f .postbindPlugins {
474
- pl .Postbind (pc , pod , nodeName )
473
+ for _ , pl := range f .postBindPlugins {
474
+ pl .PostBind (pc , pod , nodeName )
475
475
}
476
476
}
477
477
0 commit comments