@@ -63,14 +63,14 @@ const (
63
63
// scheduler skip preemption.
64
64
// The accompanying status message should explain why the pod is unschedulable.
65
65
Unschedulable
66
- // UnschedulableAndUnresolvable is used when a (pre-)filter plugin finds a pod unschedulable and
66
+ // UnschedulableAndUnresolvable is used when a PreFilter plugin finds a pod unschedulable and
67
67
// preemption would not change anything. Plugins should return Unschedulable if it is possible
68
68
// that the pod can get scheduled with preemption.
69
69
// The accompanying status message should explain why the pod is unschedulable.
70
70
UnschedulableAndUnresolvable
71
- // Wait is used when a permit plugin finds a pod scheduling should wait.
71
+ // Wait is used when a Permit plugin finds a pod scheduling should wait.
72
72
Wait
73
- // Skip is used when a bind plugin chooses to skip binding.
73
+ // Skip is used when a Bind plugin chooses to skip binding.
74
74
Skip
75
75
)
76
76
@@ -195,9 +195,9 @@ func (p PluginToStatus) Merge() *Status {
195
195
type WaitingPod interface {
196
196
// GetPod returns a reference to the waiting pod.
197
197
GetPod () * v1.Pod
198
- // GetPendingPlugins returns a list of pending permit plugin's name.
198
+ // GetPendingPlugins returns a list of pending Permit plugin's name.
199
199
GetPendingPlugins () []string
200
- // Allow declares the waiting pod is allowed to be scheduled by plugin pluginName.
200
+ // Allow declares the waiting pod is allowed to be scheduled by the plugin named as " pluginName" .
201
201
// If this is the last remaining plugin to allow, then a success signal is delivered
202
202
// to unblock the pod.
203
203
Allow (pluginName string )
@@ -234,7 +234,7 @@ type PreFilterExtensions interface {
234
234
RemovePod (ctx context.Context , state * CycleState , podToSchedule * v1.Pod , podToRemove * v1.Pod , nodeInfo * NodeInfo ) * Status
235
235
}
236
236
237
- // PreFilterPlugin is an interface that must be implemented by "prefilter " plugins.
237
+ // PreFilterPlugin is an interface that must be implemented by "PreFilter " plugins.
238
238
// These plugins are called at the beginning of the scheduling cycle.
239
239
type PreFilterPlugin interface {
240
240
Plugin
@@ -273,7 +273,7 @@ type FilterPlugin interface {
273
273
Filter (ctx context.Context , state * CycleState , pod * v1.Pod , nodeInfo * NodeInfo ) * Status
274
274
}
275
275
276
- // PostFilterPlugin is an interface for PostFilter plugins. These plugins are called
276
+ // PostFilterPlugin is an interface for " PostFilter" plugins. These plugins are called
277
277
// after a pod cannot be scheduled.
278
278
type PostFilterPlugin interface {
279
279
Plugin
@@ -290,7 +290,7 @@ type PostFilterPlugin interface {
290
290
PostFilter (ctx context.Context , state * CycleState , pod * v1.Pod , filteredNodeStatusMap NodeToStatusMap ) (* PostFilterResult , * Status )
291
291
}
292
292
293
- // PreScorePlugin is an interface for Pre-score plugin. Pre-score is an
293
+ // PreScorePlugin is an interface for "PreScore" plugin. PreScore is an
294
294
// informational extension point. Plugins will be called with a list of nodes
295
295
// that passed the filtering phase. A plugin may use this data to update internal
296
296
// state or to generate logs/metrics.
@@ -310,7 +310,7 @@ type ScoreExtensions interface {
310
310
NormalizeScore (ctx context.Context , state * CycleState , p * v1.Pod , scores NodeScoreList ) * Status
311
311
}
312
312
313
- // ScorePlugin is an interface that must be implemented by "score " plugins to rank
313
+ // ScorePlugin is an interface that must be implemented by "Score " plugins to rank
314
314
// nodes that passed the filtering phase.
315
315
type ScorePlugin interface {
316
316
Plugin
@@ -343,16 +343,16 @@ type ReservePlugin interface {
343
343
Unreserve (ctx context.Context , state * CycleState , p * v1.Pod , nodeName string )
344
344
}
345
345
346
- // PreBindPlugin is an interface that must be implemented by "prebind " plugins.
347
- // These plugins are called before a pod is bound .
346
+ // PreBindPlugin is an interface that must be implemented by "PreBind " plugins.
347
+ // These plugins are called before a pod being scheduled .
348
348
type PreBindPlugin interface {
349
349
Plugin
350
350
// PreBind is called before binding a pod. All prebind plugins must return
351
351
// success or the pod will be rejected and won't be sent for binding.
352
352
PreBind (ctx context.Context , state * CycleState , p * v1.Pod , nodeName string ) * Status
353
353
}
354
354
355
- // PostBindPlugin is an interface that must be implemented by "postbind " plugins.
355
+ // PostBindPlugin is an interface that must be implemented by "PostBind " plugins.
356
356
// These plugins are called after a pod is successfully bound to a node.
357
357
type PostBindPlugin interface {
358
358
Plugin
@@ -363,7 +363,7 @@ type PostBindPlugin interface {
363
363
PostBind (ctx context.Context , state * CycleState , p * v1.Pod , nodeName string )
364
364
}
365
365
366
- // PermitPlugin is an interface that must be implemented by "permit " plugins.
366
+ // PermitPlugin is an interface that must be implemented by "Permit " plugins.
367
367
// These plugins are called before a pod is bound to a node.
368
368
type PermitPlugin interface {
369
369
Plugin
@@ -376,7 +376,7 @@ type PermitPlugin interface {
376
376
Permit (ctx context.Context , state * CycleState , p * v1.Pod , nodeName string ) (* Status , time.Duration )
377
377
}
378
378
379
- // BindPlugin is an interface that must be implemented by "bind " plugins. Bind
379
+ // BindPlugin is an interface that must be implemented by "Bind " plugins. Bind
380
380
// plugins are used to bind a pod to a Node.
381
381
type BindPlugin interface {
382
382
Plugin
@@ -396,13 +396,13 @@ type Framework interface {
396
396
// QueueSortFunc returns the function to sort pods in scheduling queue
397
397
QueueSortFunc () LessFunc
398
398
399
- // RunPreFilterPlugins runs the set of configured prefilter plugins. It returns
399
+ // RunPreFilterPlugins runs the set of configured PreFilter plugins. It returns
400
400
// *Status and its code is set to non-success if any of the plugins returns
401
401
// anything but Success. If a non-success status is returned, then the scheduling
402
402
// cycle is aborted.
403
403
RunPreFilterPlugins (ctx context.Context , state * CycleState , pod * v1.Pod ) * Status
404
404
405
- // RunFilterPlugins runs the set of configured filter plugins for pod on
405
+ // RunFilterPlugins runs the set of configured Filter plugins for pod on
406
406
// the given node. Note that for the node being evaluated, the passed nodeInfo
407
407
// reference could be different from the one in NodeInfoSnapshot map (e.g., pods
408
408
// considered to be running on the node could be different). For example, during
@@ -427,61 +427,61 @@ type Framework interface {
427
427
// status other than Success.
428
428
RunPreFilterExtensionRemovePod (ctx context.Context , state * CycleState , podToSchedule * v1.Pod , podToAdd * v1.Pod , nodeInfo * NodeInfo ) * Status
429
429
430
- // RunPreScorePlugins runs the set of configured pre-score plugins. If any
430
+ // RunPreScorePlugins runs the set of configured PreScore plugins. If any
431
431
// of these plugins returns any status other than "Success", the given pod is rejected.
432
432
RunPreScorePlugins (ctx context.Context , state * CycleState , pod * v1.Pod , nodes []* v1.Node ) * Status
433
433
434
- // RunScorePlugins runs the set of configured scoring plugins. It returns a map that
435
- // stores for each scoring plugin name the corresponding NodeScoreList(s).
434
+ // RunScorePlugins runs the set of configured Score plugins. It returns a map that
435
+ // stores for each Score plugin name the corresponding NodeScoreList(s).
436
436
// It also returns *Status, which is set to non-success if any of the plugins returns
437
437
// a non-success status.
438
438
RunScorePlugins (ctx context.Context , state * CycleState , pod * v1.Pod , nodes []* v1.Node ) (PluginToNodeScores , * Status )
439
439
440
- // RunPreBindPlugins runs the set of configured prebind plugins. It returns
440
+ // RunPreBindPlugins runs the set of configured PreBind plugins. It returns
441
441
// *Status and its code is set to non-success if any of the plugins returns
442
442
// anything but Success. If the Status code is "Unschedulable", it is
443
443
// considered as a scheduling check failure, otherwise, it is considered as an
444
444
// internal error. In either case the pod is not going to be bound.
445
445
RunPreBindPlugins (ctx context.Context , state * CycleState , pod * v1.Pod , nodeName string ) * Status
446
446
447
- // RunPostBindPlugins runs the set of configured postbind plugins.
447
+ // RunPostBindPlugins runs the set of configured PostBind plugins.
448
448
RunPostBindPlugins (ctx context.Context , state * CycleState , pod * v1.Pod , nodeName string )
449
449
450
450
// RunReservePluginsReserve runs the Reserve method of the set of
451
- // configured reserve plugins. If any of these calls returns an error, it
451
+ // configured Reserve plugins. If any of these calls returns an error, it
452
452
// does not continue running the remaining ones and returns the error. In
453
453
// such case, pod will not be scheduled.
454
454
RunReservePluginsReserve (ctx context.Context , state * CycleState , pod * v1.Pod , nodeName string ) * Status
455
455
456
456
// RunReservePluginsUnreserve runs the Unreserve method of the set of
457
- // configured reserve plugins.
457
+ // configured Reserve plugins.
458
458
RunReservePluginsUnreserve (ctx context.Context , state * CycleState , pod * v1.Pod , nodeName string )
459
459
460
- // RunPermitPlugins runs the set of configured permit plugins. If any of these
460
+ // RunPermitPlugins runs the set of configured Permit plugins. If any of these
461
461
// plugins returns a status other than "Success" or "Wait", it does not continue
462
462
// running the remaining plugins and returns an error. Otherwise, if any of the
463
463
// plugins returns "Wait", then this function will create and add waiting pod
464
464
// to a map of currently waiting pods and return status with "Wait" code.
465
- // Pod will remain waiting pod for the minimum duration returned by the permit plugins.
465
+ // Pod will remain waiting pod for the minimum duration returned by the Permit plugins.
466
466
RunPermitPlugins (ctx context.Context , state * CycleState , pod * v1.Pod , nodeName string ) * Status
467
467
468
468
// WaitOnPermit will block, if the pod is a waiting pod, until the waiting pod is rejected or allowed.
469
469
WaitOnPermit (ctx context.Context , pod * v1.Pod ) * Status
470
470
471
- // RunBindPlugins runs the set of configured bind plugins. A bind plugin may choose
472
- // whether or not to handle the given Pod. If a bind plugin chooses to skip the
471
+ // RunBindPlugins runs the set of configured Bind plugins. A Bind plugin may choose
472
+ // whether or not to handle the given Pod. If a Bind plugin chooses to skip the
473
473
// binding, it should return code=5("skip") status. Otherwise, it should return "Error"
474
474
// or "Success". If none of the plugins handled binding, RunBindPlugins returns
475
475
// code=5("skip") status.
476
476
RunBindPlugins (ctx context.Context , state * CycleState , pod * v1.Pod , nodeName string ) * Status
477
477
478
- // HasFilterPlugins returns true if at least one filter plugin is defined.
478
+ // HasFilterPlugins returns true if at least one Filter plugin is defined.
479
479
HasFilterPlugins () bool
480
480
481
- // HasPostFilterPlugins returns true if at least one postFilter plugin is defined.
481
+ // HasPostFilterPlugins returns true if at least one PostFilter plugin is defined.
482
482
HasPostFilterPlugins () bool
483
483
484
- // HasScorePlugins returns true if at least one score plugin is defined.
484
+ // HasScorePlugins returns true if at least one Score plugin is defined.
485
485
HasScorePlugins () bool
486
486
487
487
// ListPlugins returns a map of extension point name to list of configured Plugins.
0 commit comments