Commit Graph

1200 Commits

Author SHA1 Message Date
AxeZhan
b1f07bb36c add tests for scheduler 2024-10-10 15:53:19 +08:00
Kubernetes Prow Robot
3de975b732 Merge pull request #125171 from YamasouA/ft/queuehint-csidriver
volumebinding: scheduler queueing hints - CSIDriver
2024-10-04 00:26:27 +01:00
YamasouA
6dbaa5660e fix test 2024-10-02 22:50:39 +09:00
googs1025
24a28766d4 chore(scheduler dra): improve dra queue hint unit test 2024-10-01 17:22:15 +08:00
Kubernetes Prow Robot
67cdc26214 Merge pull request #127497 from pohly/dra-scheduler-queueing-hints-fix
DRA scheduler: fix queuing hint support
2024-09-30 23:21:48 +01:00
Patrick Ohly
aee77bfc84 DRA scheduler: add special ActionType for ResourceClaim changes
Having a dedicated ActionType which only gets used when the scheduler itself
already detects some change in the list of generated ResourceClaims of a pod
avoids calling the DRA plugin for unrelated Pod changes.
2024-09-27 16:53:58 +02:00
Patrick Ohly
d425353c13 DRA scheduler: reduce verbosity of queuing hints
Other hints also only use V(5) or higher.
2024-09-27 08:15:33 +02:00
Patrick Ohly
4a265feb83 DRA scheduler: fix queuing hint support
d66f8f9 added that "plugins have to implement a QueueingHint for Pod/Update
event if the rejection from them could be resolved by updating unscheduled
Pods itself".

This applies to DRA because the name of a generated ResourceClaim must be
recorded in the pod status before the pod can be scheduled.
2024-09-27 08:15:33 +02:00
Kubernetes Prow Robot
960e3984b0 Merge pull request #127444 from dom4ha/fine-grained-qhints
Fine grain QueueHints for NodeAffinity plugin
2024-09-27 01:42:00 +01:00
dom4ha
c7db4bb450 Fine grain QueueHints for nodeaffinity plugin.
Skip queue on unrelated change that keeps pod schedulable when QueueHints are enabled.

Split add from QHints disabled case

Remove case when QHints are disabled

Remove two GHint alternatives in unit tests

more fine-grained Node QHint for NodeResourceFit plugin

Return early when updated Node causes unmatch

Revert "more fine-grained Node QHint for NodeResourceFit plugin"

This reverts commit dfbceb60e0c1c4e47748c12722d9ed6dba1a8366.

Add integration test for requeue of a pod previously rejected by NodeAffinity plugin when a suitable Node is added

Add integratin test for a Node update operation that does not trigger requeue in NodeAffinity plugin

Remove innacurrate comment

Apply review comments
2024-09-26 10:21:08 +00:00
dom4ha
903b1f7e28 more fine-grained Node QHint for NodeResourceFit plugin 2024-09-26 09:51:36 +00:00
YamasouA
84f45c81ca tweak 2024-09-25 22:37:05 +09:00
YamasouA
b4d9fe3957 delete framework.Add 2024-09-25 22:37:05 +09:00
YamasouA
b98634c2da volumebinding: scheduler queueing hints - CSIDriver
fix if condition

add test

add log

eliminate unnecessary args from log

fix Queue condition

check original pod status

fix return value when can scheduleable

fix tweak

fix testcase
2024-09-25 22:37:05 +09:00
Kubernetes Prow Robot
75214d11d5 Merge pull request #127428 from googs1025/scheduler/plugin
chore(scheduler): refactor import package ordering in scheduler
2024-09-25 11:40:07 +01:00
Kubernetes Prow Robot
211d67a511 Merge pull request #125398 from AxeZhan/pvAffinity
[scheduler] When the hostname and nodename of a node do not match, ensure that pods carrying PVs with nodeAffinity are scheduled correctly.
2024-09-23 21:22:02 +01:00
Kubernetes Prow Robot
a87215915f Merge pull request #127447 from sanposhiho/bug-topologyspread
fix(topologyspread): register UpdatePodTolerations when QHint is enabled
2024-09-22 06:59:58 +01:00
Kubernetes Prow Robot
04bba3c222 Merge pull request #127427 from sanposhiho/bug-nodeunsched
bug(nodeunschedulable): register missing Pod event for NodeUnschedulable plugin
2024-09-19 20:23:37 +01:00
Kensei Nakada
f457777fe8 chore: use DeepEqual from equality.Semantic instead of reflect 2024-09-19 11:22:12 +09:00
googs1025
86aee8cbc7 feature(scheduler): more fine-grained QHints for nodeunschedulable plugin 2024-09-19 10:05:06 +08:00
Kensei Nakada
9c3d4a6fe4 fix(topologyspread): register UpdatePodTolerations when QHint is enabled 2024-09-19 00:36:51 +09:00
googs1025
69831b0043 chore(scheduler): refactor import package ordering 2024-09-18 20:31:03 +08:00
Kensei Nakada
495981974e bug(nodeunschedulable): register missing Pod event for NodeUnschedulable plugin 2024-09-18 17:49:12 +09:00
Kensei Nakada
4a81a85449 chore(noderesourcefit): correct tests and clean up comments 2024-09-17 13:28:27 +09:00
Kensei Nakada
fe3ab649d0 feat: remove node general update event from EventsToRegister when QHint is enabled 2024-09-14 16:15:40 +09:00
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