Skip to content

Commit dad8686

Browse files
authored
Merge pull request #43813 from sanposhiho/qhint
add a doc for QueueingHint
2 parents fb8f9b8 + de6a641 commit dad8686

File tree

1 file changed

+31
-7
lines changed

1 file changed

+31
-7
lines changed

content/en/docs/concepts/scheduling-eviction/scheduling-framework.md

Lines changed: 31 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -43,15 +43,17 @@ A scheduling or binding cycle can be aborted if the Pod is determined to
4343
be unschedulable or if there is an internal error. The Pod will be returned to
4444
the queue and retried.
4545

46-
## Extension points
46+
## Interfaces
4747

48-
The following picture shows the scheduling context of a Pod and the extension
49-
points that the scheduling framework exposes. In this picture "Filter" is
50-
equivalent to "Predicate" and "Scoring" is equivalent to "Priority function".
48+
The following picture shows the scheduling context of a Pod and the interfaces
49+
that the scheduling framework exposes.
5150

52-
One plugin may register at multiple extension points to perform more complex or
51+
One plugin may implement multiple interfaces to perform more complex or
5352
stateful tasks.
5453

54+
Some interfaces match the scheduler extension points which can be configured through
55+
[Scheduler Configuration](/docs/reference/scheduling/config/#extension-points).
56+
5557
{{< figure src="/images/docs/scheduling-framework-extensions.png" title="Scheduling framework extension points" class="diagram-large">}}
5658

5759
### PreEnqueue {#pre-enqueue}
@@ -65,6 +67,28 @@ Otherwise, it's placed in the internal unschedulable Pods list, and doesn't get
6567
For more details about how internal scheduler queues work, read
6668
[Scheduling queue in kube-scheduler](https://github.com/kubernetes/community/blob/f03b6d5692bd979f07dd472e7b6836b2dad0fd9b/contributors/devel/sig-scheduling/scheduler_queues.md).
6769

70+
### EnqueueExtension
71+
72+
EnqueueExtension is the interface where the plugin can control
73+
whether to retry scheduling of Pods rejected by this plugin, based on changes in the cluster.
74+
Plugins that implement PreEnqueue, PreFilter, Filter, Reserve or Permit should implement this interface.
75+
76+
#### QueueingHint
77+
78+
{{< feature-state for_k8s_version="v1.28" state="beta" >}}
79+
80+
QueueingHint is a callback function for deciding whether a Pod can be requeued to the active queue or backoff queue.
81+
It's executed every time a certain kind of event or change happens in the cluster.
82+
When the QueueingHint finds that the event might make the Pod schedulable,
83+
the Pod is put into the active queue or the backoff queue
84+
so that the scheduler will retry the scheduling of the Pod.
85+
86+
{{< note >}}
87+
QueueingHint evaluation during scheduling is a beta-level feature and is enabled by default in 1.28.
88+
You can disable it via the
89+
`SchedulerQueueingHints` [feature gate](/docs/reference/command-line-tools-reference/feature-gates/).
90+
{{< /note >}}
91+
6892
### QueueSort {#queue-sort}
6993

7094
These plugins are used to sort Pods in the scheduling queue. A queue sort plugin
@@ -148,7 +172,7 @@ NormalizeScore extension point.
148172

149173
### Reserve {#reserve}
150174

151-
A plugin that implements the Reserve extension has two methods, namely `Reserve`
175+
A plugin that implements the Reserve interface has two methods, namely `Reserve`
152176
and `Unreserve`, that back two informational scheduling phases called Reserve
153177
and Unreserve, respectively. Plugins which maintain runtime state (aka "stateful
154178
plugins") should use these phases to be notified by the scheduler when resources
@@ -218,7 +242,7 @@ skipped**.
218242

219243
### PostBind {#post-bind}
220244

221-
This is an informational extension point. Post-bind plugins are called after a
245+
This is an informational interface. Post-bind plugins are called after a
222246
Pod is successfully bound. This is the end of a binding cycle, and can be used
223247
to clean up associated resources.
224248

0 commit comments

Comments
 (0)