Commit Graph

1628 Commits

Author SHA1 Message Date
Richa Banker
6944af22d1 Initialize scheduler metrics after metrics options are applied 2024-09-13 12:52:32 -07:00
Kubernetes Prow Robot
38f68d59a7 Merge pull request #127256 from dom4ha/scheduler_test_logging
Enable testing logger in the remaining scheduler tests.
2024-09-11 22:17:12 +01:00
dom4ha
e7827879db Enable testing logger in the remaining scheduler tests. 2024-09-09 21:59:24 +00:00
Kubernetes Prow Robot
0c5e832aa2 Merge pull request #127154 from macsko/check_if_inflight_events_empty_in_testcase_end_scheduler_perf
Check if InFlightEvents is empty after scheduler_perf workload
2024-09-09 20:43:33 +01:00
Maciej Skoczeń
7d4c713520 Check if InFlightEvents is empty after scheduler_perf workload 2024-09-09 08:00:34 +00:00
Kensei Nakada
24a14aa810 fix: run a test for requeueing with PreFilterResult correctly 2024-09-07 23:52:45 +09:00
Kensei Nakada
b456d705eb fix: include PendingPlugins in QueuedPodInfo.DeepCopy properly 2024-09-06 10:45:40 +09:00
Kubernetes Prow Robot
4bc6a11d78 Merge pull request #127083 from sanposhiho/scheduler-smaller-event
feat: implement Pod smaller update events
2024-09-03 14:05:22 +01:00
Kensei Nakada
03e3779d40 feat: implement Pod smaller update events 2024-09-03 16:25:28 +09:00
Kubernetes Prow Robot
e90364f45d Merge pull request #126465 from googs1025/podEligibleToPreemptOthers_refactor
feat: add ctx param for PodEligibleToPreemptOthers
2024-09-02 12:02:56 +01:00
Kubernetes Prow Robot
59051eb003 Merge pull request #126029 from sanposhiho/backoff-preenqueue
scheduler: impose a backoff penalty on gated Pods
2024-08-28 21:58:01 +01:00
Kensei Nakada
b5a156971f scheduler: impose a backoff penalty on gated Pods 2024-08-27 09:57:59 +09:00
Kensei Nakada
baf69640d3 fix(scheduler_one): call Done() as soon as possible 2024-08-27 09:30:47 +09:00
Kubernetes Prow Robot
072825f9a3 Merge pull request #126904 from sanposhiho/move-internal
chore: move the scheduler internal components out of internal dir
2024-08-26 20:51:02 +01:00
Kubernetes Prow Robot
0bcbc3b77a Merge pull request #124003 from carlory/scheduler-rm-non-csi-limit
kube-scheduler remove non-csi volumelimit plugins
2024-08-26 12:02:13 +01:00
Kensei Nakada
8519d3399f chore: move the scheduler internal components out of internal dir 2024-08-25 13:10:29 +09:00
Kubernetes Prow Robot
b1559c66ca Merge pull request #126807 from pohly/dra-resourceslice-update
DRA scheduler: ResourceSlice update
2024-08-22 15:18:09 +01:00
Patrick Ohly
e85d3babf0 DRA scheduler: fix re-scheduling after ResourceSlice changes
Making unschedulable pods schedulable again after ResourceSlice cluster events
was accidentally left out when adding structured parameters to Kubernetes 1.30.

All E2E tests were defined so that a driver starts first. A new test with a
different order (create pod first, wait for unschedulable, start driver)
triggered the bug and now passes.
2024-08-22 10:09:32 +02:00
Patrick Ohly
6dd2ade762 DRA scheduler: reduce log verbosity
That a pod with no claims remains unschedulable on claim changes is a pretty
normal case. It should only be logged when debugging.
2024-08-22 10:09:32 +02:00
Maciej Skoczeń
33815db3c1 Move NominatedPodsForNode to scheduling queue directly 2024-08-21 07:24:52 +00:00
Kubernetes Prow Robot
113b12c6fb Merge pull request #124439 from bells17/csi-translation-lib-structured-and-contextual-logging
Migrate k8s.io/csi-translation-lib/.* to structured logging
2024-08-19 18:13:54 -07:00
googs1025
fc0fcd0044 feat: add ctx param for PodEligibleToPreemptOthers 2024-08-14 20:06:05 +08:00
Kubernetes Prow Robot
03e8154063 Merge pull request #126644 from Huang-Wei/fix-preemption
Fix a scheduler preemption issue where the victim isn't properly patched, leading to preemption not functioning as expected
2024-08-13 22:12:09 -07:00
Kubernetes Prow Robot
5b95fdb374 Merge pull request #126476 from pohly/scheduler-framework-filter-docs
scheduler: document behavior of Error status returned by Filter
2024-08-13 22:10:42 -07:00
Kubernetes Prow Robot
ea1143efc7 Merge pull request #126022 from macsko/new_node_to_status_map_structure
Change structure of NodeToStatus map in scheduler
2024-08-13 21:02:55 -07:00
Toru Komatsu
a7242fcff7 Implement PVC/Add QueueingHint in CSILimit plugin (#124703)
Signed-off-by: utam0k <k0ma@utam0k.jp>
2024-08-13 21:02:42 -07:00
Wei Huang
f6a11da279 fix a scheduler preemption issue that victim is not patched properly 2024-08-12 15:25:10 -07:00
carlory
cba2b3f773 kube-scheduler remove non-csi volumelimit plugins 2024-08-05 15:02:32 +08:00
Patrick Ohly
d71d59b91e scheduler: document behavior of Error status returned by Filter
This behavior was useful for https://github.com/kubernetes/kubernetes/pull/125488 but
wasn't obvious when reading the documentation.
2024-07-31 08:55:46 +02:00
Maciej Skoczeń
98be7dfc5d Change structure of NodeToStatus map in scheduler 2024-07-25 07:48:35 +00:00
Kubernetes Prow Robot
39a80796b6 Merge pull request #122628 from sanposhiho/pod-smaller-events
add(scheduler/framework): implement smaller Pod update events
2024-07-23 18:01:46 -07:00
Kubernetes Prow Robot
a00181d4d4 Merge pull request #121902 from carlory/kep-3751-pv-controller
[kep-3751] pvc bind pv with vac
2024-07-23 11:02:13 -07:00
Kensei Nakada
3f59d9fc4c fix typo 2024-07-23 17:43:21 +09:00
carlory
3a6a4830df pvc bind pv with vac 2024-07-23 15:04:11 +08:00
Kubernetes Prow Robot
d21b17264e Merge pull request #125488 from pohly/dra-1.31
DRA for 1.31
2024-07-22 11:45:55 -07:00
Patrick Ohly
9f36c8d718 DRA: add DRAControlPlaneController feature gate for "classic DRA"
In the API, the effect of the feature gate is that alpha fields get dropped on
create. They get preserved during updates if already set. The
PodSchedulingContext registration is *not* restricted by the feature gate.
This enables deleting stale PodSchedulingContext objects after disabling
the feature gate.

The scheduler checks the new feature gate before setting up an informer for
PodSchedulingContext objects and when deciding whether it can schedule a
pod. If any claim depends on a control plane controller, the scheduler bails
out, leading to:

    Status:       Pending
    ...
      Warning  FailedScheduling             73s   default-scheduler  0/1 nodes are available: resourceclaim depends on disabled DRAControlPlaneController feature. no new claims to deallocate, preemption: 0/1 nodes are available: 1 Preemption is not helpful for scheduling.

The rest of the changes prepare for testing the new feature separately from
"structured parameters". The goal is to have base "dra" jobs which just enable
and test those, then "classic-dra" jobs which add DRAControlPlaneController.
2024-07-22 18:09:34 +02:00
Patrick Ohly
599fe605f9 DRA scheduler: adapt to v1alpha3 API
The structured parameter allocation logic was written from scratch in
staging/src/k8s.io/dynamic-resource-allocation/structured where it might be
useful for out-of-tree components.

Besides the new features (amount, admin access) and API it now supports
backtracking when the initial device selection doesn't lead to a complete
allocation of all claims.

Co-authored-by: Ed Bartosh <eduard.bartosh@intel.com>
Co-authored-by: John Belamaric <jbelamaric@google.com>
2024-07-22 18:09:34 +02:00
Patrick Ohly
91d7882e86 DRA: new API for 1.31
This is a complete revamp of the original API. Some of the key
differences:
- refocused on structured parameters and allocating devices
- support for constraints across devices
- support for allocating "all" or a fixed amount
  of similar devices in a single request
- no class for ResourceClaims, instead individual
  device requests are associated with a mandatory
  DeviceClass

For the sake of simplicity, optional basic types (ints, strings) where the null
value is the default are represented as values in the API types. This makes Go
code simpler because it doesn't have to check for nil (consumers) and values
can be set directly (producers). The effect is that in protobuf, these fields
always get encoded because `opt` only has an effect for pointers.

The roundtrip test data for v1.29.0 and v1.30.0 changes because of the new
"request" field. This is considered acceptable because the entire `claims`
field in the pod spec is still alpha.

The implementation is complete enough to bring up the apiserver.
Adapting other components follows.
2024-07-22 18:09:34 +02:00
杨朱 · Kiki
bc3c07091b Fix a bug where the target pod doesn't become schedulable within 5 minutes when a deleted pod uses the same PVC with the ReadWriteOncePod access mode. (#126263)
Co-authored-by: Kensei Nakada <handbomusic@gmail.com>
2024-07-22 01:20:34 -07:00
Patrick Ohly
8a629b9f15 DRA: remove "sharable" from claim allocation result
Now all claims are shareable up to the limit imposed by the size of the
"reserverFor" array.

This is one of the agreed simplifications for 1.31.
2024-07-21 17:28:14 +02:00
Patrick Ohly
de5742ae83 DRA: remove immediate allocation
As agreed in https://github.com/kubernetes/enhancements/pull/4709, immediate
allocation is one of those features which can be removed because it makes no
sense for structured parameters and the justification for classic DRA is weak.
2024-07-21 17:28:14 +02:00
Patrick Ohly
b51d68bb87 DRA: bump API v1alpha2 -> v1alpha3
This is in preparation for revamping the resource.k8s.io completely. Because
there will be no support for transitioning from v1alpha2 to v1alpha3, the
roundtrip test data for that API in 1.29 and 1.30 gets removed.

Repeating the version in the import name of the API packages is not really
required. It was done for a while to support simpler grepping for usage of
alpha APIs, but there are better ways for that now. So during this transition,
"resourceapi" gets used instead of "resourcev1alpha3" and the version gets
dropped from informer and lister imports. The advantage is that the next bump
to v1beta1 will affect fewer source code lines.

Only source code where the version really matters (like API registration)
retains the versioned import.
2024-07-21 17:28:13 +02:00
Kensei Nakada
fa8092f838 support UpdatePodScaleDown instead of UpdatePodRequest 2024-07-20 19:20:38 +09:00
Kensei Nakada
0dee497876 fix: make updatePodOther private 2024-07-20 17:49:46 +09:00
Kensei Nakada
0b133c7fa9 modify test 2024-07-20 17:44:57 +09:00
Kensei Nakada
e46fe0b673 register UpdatePodOther to a general Update 2024-07-20 17:44:57 +09:00
Kensei Nakada
066826d476 fix wordings 2024-07-20 17:44:57 +09:00
Kensei Nakada
4283ab5df3 use PodUpdateOther internally 2024-07-20 17:44:55 +09:00
Kensei Nakada
0cd1ee4259 add(scheduler/framework): implement smaller Pod update events 2024-07-20 17:44:23 +09:00
Jordan Liggitt
03d48b7683 Move CEL env initialization out of package init()
This ensures compatibility version and feature gates can be initialized
before cached CEL environments are created.
2024-07-19 15:06:48 -04:00