Skip to content

Commit eae4e6c

Browse files
committed
Graduate PodSchedulingReadiness to beta
1 parent 21af5c7 commit eae4e6c

File tree

3 files changed

+64
-19
lines changed

3 files changed

+64
-19
lines changed
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
11
kep-number: 3521
22
alpha:
33
approver: "@wojtek-t"
4+
beta:
5+
approver: "@wojtek-t"

keps/sig-scheduling/3521-pod-scheduling-readiness/README.md

Lines changed: 59 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -140,9 +140,9 @@ Items marked with (R) are required *prior to targeting to a milestone / release*
140140
- [ ] (R) [all GA Endpoints](https://github.com/kubernetes/community/pull/1806) must be hit by [Conformance Tests](https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/conformance-tests.md)
141141
- [ ] (R) Production readiness review completed
142142
- [ ] (R) Production readiness review approved
143-
- [ ] "Implementation History" section is up-to-date for milestone
144-
- [ ] User-facing documentation has been created in [kubernetes/website], for publication to [kubernetes.io]
145-
- [ ] Supporting documentation—e.g., additional design documents, links to mailing list discussions/SIG meetings, relevant PRs/issues, release notes
143+
- [x] "Implementation History" section is up-to-date for milestone
144+
- [x] User-facing documentation has been created in [kubernetes/website], for publication to [kubernetes.io]
145+
- [x] Supporting documentation—e.g., additional design documents, links to mailing list discussions/SIG meetings, relevant PRs/issues, release notes
146146

147147
<!--
148148
**Note:** This checklist is iterative and should be reviewed and updated every time this enhancement is being considered for a milestone.
@@ -797,6 +797,10 @@ What signals should users be paying attention to when the feature is young
797797
that might indicate a serious problem?
798798
-->
799799

800+
A rollback might be considered if the metric `scheduler_pending_pods{queue="gated"}` stays in a
801+
high watermark for a long time. It, if not intentionally, may reveal that some controllers forget
802+
to empty the Pods' scheduling gates, which keep them in pending state.
803+
800804
###### Were upgrade and rollback tested? Was the upgrade->downgrade->upgrade path tested?
801805

802806
<!--
@@ -805,12 +809,16 @@ Longer term, we may want to require automated upgrade/rollback tests, but we
805809
are missing a bunch of machinery and tooling and can't do that now.
806810
-->
807811

812+
It will be tested manually prior to beta launch.
813+
808814
###### Is the rollout accompanied by any deprecations and/or removals of features, APIs, fields of API types, flags, etc.?
809815

810816
<!--
811817
Even if applying deprecation policies, they may still surprise some users.
812818
-->
813819

820+
No.
821+
814822
### Monitoring Requirements
815823

816824
<!--
@@ -820,13 +828,16 @@ For GA, this section is required: approvers should be able to confirm the
820828
previous answers based on experience in the field.
821829
-->
822830

823-
Add a label `notReady` to the existing metric `pending_pods` to distinguish unschedulable Pods:
831+
A new "queue" type `gated` is added to the existing metric `scheduler_pending_pods` to distinguish
832+
unschedulable Pods:
824833

825-
- `unschedulable` (existing): scheduler tried but cannot find any Node to host the Pod
826-
- `notReady` (new): scheduler respect the Pod's present `schedulingGates` and hence not schedule it
834+
- `scheduler_pending_pods{queue="unschedulable"}` (existing): scheduler tried but cannot find any
835+
Node to host the Pod
836+
- `scheduler_pending_pods{queue="gated"}` (new): scheduler respect the Pod's present `schedulingGates`
837+
and hence not schedule it
827838

828839
Moreover, to explicitly indicate a Pod's scheduling-unready state, a condition
829-
`{type:PodScheduled, reason:WaitingForGates}` is introduced.
840+
`{type:PodScheduled, reason:SchedulingGated}` is introduced.
830841

831842
###### How can an operator determine if the feature is in use by workloads?
832843

@@ -836,6 +847,9 @@ checking if there are objects with field X set) may be a last resort. Avoid
836847
logs or events for this purpose.
837848
-->
838849

850+
- observe non-zero value for the metric `pending_pods{queue="gated"}`
851+
- observe non-empty value in a Pod's `.spec.schedulingGates` field
852+
839853
###### How can someone using this feature know that it is working for their instance?
840854

841855
<!--
@@ -854,6 +868,11 @@ Recall that end users cannot usually observe component logs or access metrics.
854868

855869
- [x] API .spec
856870
- Other field: `schedulingGates`
871+
- [x] Events
872+
- Event Type: PodScheduled
873+
- Event Status: False
874+
- Event Reason: WaitingForGates SchedulingGated
875+
- Event Message: Scheduling is blocked due to non-empty scheduling gates
857876

858877
###### What are the reasonable SLOs (Service Level Objectives) for the enhancement?
859878

@@ -872,18 +891,17 @@ These goals will help you determine what you need to measure (SLIs) in the next
872891
question.
873892
-->
874893

894+
N/A.
895+
875896
###### What are the SLIs (Service Level Indicators) an operator can use to determine the health of the service?
876897

877898
<!--
878899
Pick one more of these and delete the rest.
879900
-->
880901

881-
- [ ] Metrics
882-
- Metric name:
883-
- [Optional] Aggregation method:
884-
- Components exposing the metric:
885-
- [ ] Other (treat as last resort)
886-
- Details:
902+
- [x] Metrics
903+
- Metric name: scheduler_pending_pods{queue="gated"}
904+
- Components exposing the metric: kube-scheduler
887905

888906
###### Are there any missing metrics that would be useful to have to improve observability of this feature?
889907

@@ -892,12 +910,16 @@ Describe the metrics themselves and the reasons why they weren't added (e.g., co
892910
implementation difficulties, etc.).
893911
-->
894912

913+
N/A.
914+
895915
### Dependencies
896916

897917
<!--
898918
This section must be completed when targeting beta to a release.
899919
-->
900920

921+
N/A.
922+
901923
###### Does this feature depend on any specific services running in the cluster?
902924

903925
<!--
@@ -915,6 +937,8 @@ and creating new ones, as well as about cluster-level services (e.g. DNS):
915937
- Impact of its degraded performance or high-error rates on the feature:
916938
-->
917939

940+
N/A.
941+
918942
### Scalability
919943

920944
<!--
@@ -951,6 +975,9 @@ Describe them, providing:
951975
- Supported number of objects per namespace (for namespace-scoped objects)
952976
-->
953977

978+
The feature itself doesn't generate API calls. But it's expected the API Server would receive
979+
additional update/patch requests to mutate the scheduling gates, by external controllers.
980+
954981
###### Will enabling / using this feature result in any new calls to the cloud provider?
955982

956983
<!--
@@ -959,6 +986,8 @@ Describe them, providing:
959986
- Estimated increase:
960987
-->
961988

989+
No.
990+
962991
###### Will enabling / using this feature result in increasing size or count of the existing API objects?
963992

964993
<!--
@@ -968,6 +997,8 @@ Describe them, providing:
968997
- Estimated amount of new objects: (e.g., new Object X for every existing Pod)
969998
-->
970999

1000+
No to existing API objects that doesn't use this feature.
1001+
9711002
###### Will enabling / using this feature result in increasing time taken by any operations covered by existing SLIs/SLOs?
9721003

9731004
<!--
@@ -979,6 +1010,8 @@ Think about adding additional work or introducing new steps in between
9791010
[existing SLIs/SLOs]: https://git.k8s.io/community/sig-scalability/slos/slos.md#kubernetes-slisslos
9801011
-->
9811012

1013+
No.
1014+
9821015
###### Will enabling / using this feature result in non-negligible increase of resource usage (CPU, RAM, disk, IO, ...) in any components?
9831016

9841017
<!--
@@ -991,6 +1024,8 @@ This through this both in small and large cases, again with respect to the
9911024
[supported limits]: https://git.k8s.io/community//sig-scalability/configs-and-limits/thresholds.md
9921025
-->
9931026

1027+
No.
1028+
9941029
### Troubleshooting
9951030

9961031
<!--
@@ -1006,6 +1041,8 @@ details). For now, we leave it here.
10061041

10071042
###### How does this feature react if the API server and/or etcd is unavailable?
10081043

1044+
Update/Patch requests will be rejected.
1045+
10091046
###### What are other known failure modes?
10101047

10111048
<!--
@@ -1021,8 +1058,13 @@ For each of them, fill in the following information by copying the below templat
10211058
- Testing: Are there any tests for failure mode? If not, describe why.
10221059
-->
10231060

1061+
In a highly-available cluster, if there are skewed API Servers, some update requests
1062+
may get accepted and some may get rejected.
1063+
10241064
###### What steps should be taken if SLOs are not being met to determine the problem?
10251065

1066+
N/A.
1067+
10261068
## Implementation History
10271069

10281070
<!--
@@ -1036,7 +1078,8 @@ Major milestones might include:
10361078
- when the KEP was retired or superseded
10371079
-->
10381080

1039-
- 2022-09-16 - Initial Proposal
1081+
- 2022-09-16: Initial KEP
1082+
- 2022-01-14: Graduate the feature to Beta
10401083

10411084
## Drawbacks
10421085

@@ -1052,11 +1095,11 @@ not need to be as detailed as the proposal, but should include enough
10521095
information to express the idea and why it was not acceptable.
10531096
-->
10541097

1055-
- Define a boolean filed `.spec.schedulingPaused`. Its value is optionally initialized to `True` to
1098+
Define a boolean filed `.spec.schedulingPaused`. Its value is optionally initialized to `True` to
10561099
indicate it's not scheduling-ready, and flipped to `False` (by a controller) afterwards to trigger
10571100
this Pod's scheduling cycle.
10581101

1059-
This approach is not chosen because it cannot support multiple independent controllers to control
1102+
This approach is not chosen because it cannot support multiple independent controllers to control
10601103
specific aspect a Pod's scheduling readiness.
10611104

10621105
## Infrastructure Needed (Optional)

keps/sig-scheduling/3521-pod-scheduling-readiness/kep.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,12 +18,12 @@ see-also:
1818
- "/keps/sig-scheduling/624-scheduling-framework"
1919

2020
# The target maturity stage in the current dev cycle for this KEP.
21-
stage: alpha
21+
stage: beta
2222

2323
# The most recent milestone for which work toward delivery of this KEP has been
2424
# done. This can be the current (upcoming) milestone, if it is being actively
2525
# worked on.
26-
latest-milestone: "v1.26"
26+
latest-milestone: "v1.27"
2727

2828
# The milestone at which this feature was, or is targeted to be, at each stage.
2929
milestone:
@@ -42,4 +42,4 @@ disable-supported: true
4242

4343
# The following PRR answers are required at beta release
4444
metrics:
45-
- TBD
45+
- scheduler_pending_pods{queue="gated"}

0 commit comments

Comments
 (0)