Commit Graph

1174 Commits

Author SHA1 Message Date
Richa Banker
6944af22d1 Initialize scheduler metrics after metrics options are applied 2024-09-13 12:52:32 -07:00
dom4ha
e7827879db Enable testing logger in the remaining scheduler tests. 2024-09-09 21:59:24 +00:00
Kensei Nakada
24a14aa810 fix: run a test for requeueing with PreFilterResult correctly 2024-09-07 23:52:45 +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
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
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
carlory
cba2b3f773 kube-scheduler remove non-csi volumelimit plugins 2024-08-05 15:02:32 +08: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
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
bells17
e1aa8197ed volumebinding: scheduler queueing hints - CSIStorageCapacity (#124961)
* volumebinding: scheduler queueing hints - CSIStorageCapacity

* Fixed points mentioned in the review

* Fixed points mentioned in the review

* Update pkg/scheduler/framework/plugins/volumebinding/volume_binding.go

Co-authored-by: Kensei Nakada <handbomusic@gmail.com>

* Update pkg/scheduler/framework/plugins/volumebinding/volume_binding_test.go

Co-authored-by: Kensei Nakada <handbomusic@gmail.com>

* Fixed points mentioned in the review

* volume_binding.go を更新

Co-authored-by: Kensei Nakada <handbomusic@gmail.com>

---------

Co-authored-by: Kensei Nakada <handbomusic@gmail.com>
2024-07-19 07:53:52 -07:00
Kubernetes Prow Robot
24fbb13eaf Merge pull request #126113 from googs1025/enqueueExtensions_refactor
scheduler: Add ctx param and error return to EnqueueExtensions.EventsToRegister()
2024-07-18 00:53:25 -07:00
bells17
1298c8a5fe csi-translation-lib: Support structured and contextual logging 2024-07-18 14:01:27 +09:00
googs1025
a3978e8315 scheduler: Add ctx param and error return to EnqueueExtensions.EventsToRegister() 2024-07-18 12:22:17 +08:00
Kubernetes Prow Robot
5d40866fae Merge pull request #125994 from carlory/fix-job-api
clean up codes after PodDisruptionConditions was promoted to GA
2024-07-17 14:37:09 -07:00
Kubernetes Prow Robot
d879103c28 Merge pull request #125820 from macsko/add_separate_lock_for_pod_nominator_scheduling_queue
Add a separate lock for pod nominator in scheduling queue
2024-07-17 12:06:10 -07:00
Maciej Skoczeń
5def93b10a Add a separate lock for pod nominator in scheduling queue 2024-07-17 07:58:59 +00:00
bells17
4c3c4128af volumebinding: scheduler queueing hints - StorageClass 2024-07-17 15:03:17 +09:00
bells17
aceb4468b6 volumebinding: scheduler queueing hints - PersistentVolumeClaim 2024-07-16 12:48:50 +09:00
Kubernetes Prow Robot
c7dab2a507 Merge pull request #125280 from HirazawaUi/add-pvc-events-queueinghintfn
Add QueueingHintFn for pvc events in VolumeRestriction plugin
2024-07-12 11:47:30 -07:00
HirazawaUi
cd13be8654 Add QueueingHintFn for pvc events in VolumeRestriction plugin 2024-07-13 00:25:39 +08:00
Kubernetes Prow Robot
31062790a1 Merge pull request #125855 from googs1025/refactor_scheduler_ut
chore: call close framework when finishing
2024-07-12 05:14:35 -07:00
Hiroyuki Moriya
52a622ad6d volumezone: scheduler queueing hints: pv (#125001)
* volumezone: scheduler queueing hints

* add_comment
2024-07-12 05:14:27 -07:00
googs1025
d4627f16a5 chore: call close framework when finishing
Signed-off-by: googs1025 <googs1025@gmail.com>
2024-07-12 18:11:04 +08:00
moriya
ac15717653 volumezone: scheduler queueing hints 2024-07-11 14:24:49 +00:00
Kubernetes Prow Robot
5b49afa66b Merge pull request #125000 from Gekko0114/vz_pvc
volumezone: scheduler queueing hints: pvc
2024-07-11 06:29:09 -07:00