157 Commits

Author SHA1 Message Date
Kubernetes Prow Robot
43560c620a Merge pull request #130522 from googs1025/feature/integration_filter_TaintToleration
chore(scheduler): add filter integration tests for missing part plugins: TaintToleration plugin
2025-03-07 04:15:45 -08:00
Kubernetes Prow Robot
9d45ea8b9d Merge pull request #128586 from mortent/DRAPrioritizedList
Prioritized Alternatives in Device Requests
2025-03-06 21:01:44 -08:00
googs1025
032b05114c chore(scheduler): add filter integration tests for missing part plugins: TaintToleration plugin 2025-03-07 09:33:49 +08:00
saintube
afb4e96510 Expose NodeInfo to Score plugins
Co-authored-by: shenxin <rougang.hrg@alibaba-inc.com>
Signed-off-by: saintube <saintube@foxmail.com>
2025-03-04 17:57:14 +08:00
Morten Torkildsen
2229a78dfe DRA: Update allocator for Prioritized Alternatives in Device Requests 2025-02-28 19:30:10 +00:00
googs1025
86f504284c feature(scheduler): add queueinghint for volumeattachment deletion 2025-02-22 14:57:41 +08:00
ndixita
6db40446de Scheduler changes:
1. Use pod-level resource when feature is enabled and resources are set at pod-level
2. Edge case handling: When a pod defines only CPU or memory limits at pod-level (but not both), and container-level requests/limits are unset, the pod-level requests stay empty for the resource without a pod-limit. The container's request for that resource is then set to the default request value from schedutil.
2024-11-08 03:00:54 +00:00
Kubernetes Prow Robot
fb033826a8 Merge pull request #128170 from sanposhiho/async-preemption
feature(KEP-4832): asynchronous preemption
2024-11-07 19:44:54 +00:00
utam0k
e828a4b40a Add integration test for NodeVolumeLimits in requeueing scenarios
Signed-off-by: utam0k <k0ma@utam0k.jp>
2024-11-07 19:51:50 +09:00
Yusuke Sakurai
992f1d9a08 add integration test for volumebinding for queueinghint 2024-11-07 14:10:26 +09:00
Kensei Nakada
69a8d0ec0b feature(KEP-4832): asynchronous preemption 2024-11-07 14:09:34 +09:00
Patrick Ohly
33ea278c51 DRA: use v1beta1 API
No code is left which depends on the v1alpha3, except of course the code
implementing that version.
2024-11-06 13:03:19 +01:00
Kubernetes Prow Robot
988769933e Merge pull request #128307 from NoicFank/bugfix-scheduler-preemption
bugfix(scheduler): preemption picks wrong victim node with higher priority pod on it
2024-10-29 19:05:02 +00:00
NoicFank
68f7a7c682 bugfix(scheduler): preemption picks wrong victim node with higher priority pod on it.
Introducing pdb to preemption had disrupted the orderliness of pods in the victims,
which would leads picking wrong victim node with higher priority pod on it.
2024-10-29 19:50:55 +08:00
Kubernetes Prow Robot
352056f09d Merge pull request #127757 from torredil/scheduler-bugfix-5123
scheduler: Improve CSILimits plugin accuracy by using VolumeAttachments
2024-10-23 18:12:52 +01:00
torredil
56f2b192cc scheduler: Improve CSILimits plugin accuracy by using VolumeAttachments
Signed-off-by: torredil <torredil@amazon.com>
2024-10-18 19:02:14 +00:00
Patrick Ohly
f84eb5ecf8 DRA: remove "classic DRA"
This removes the DRAControlPlaneController feature gate, the fields controlled
by it (claim.spec.controller, claim.status.deallocationRequested,
claim.status.allocation.controller, class.spec.suitableNodes), the
PodSchedulingContext type, and all code related to the feature.

The feature gets removed because there is no path towards beta and GA and DRA
with "structured parameters" should be able to replace it.
2024-10-16 23:09:50 +02:00
AxeZhan
b1f07bb36c add tests for scheduler 2024-10-10 15:53:19 +08:00
Kubernetes Prow Robot
7dd03c1ee5 Merge pull request #127353 from Gekko0114/integration_test_volumezone
Add integration test for VolumeZone in requeueing scenarios
2024-10-03 05:48:26 +01:00
googs1025
24a28766d4 chore(scheduler dra): improve dra queue hint unit test 2024-10-01 17:22:15 +08: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
moriya
7b8985dc03 add_test_cases 2024-09-21 01:09:10 +09:00
moriya
75266db65b Add integration test for VolumeZone in requeueing scenarios 2024-09-20 23:05:35 +09:00
Kensei Nakada
24a14aa810 fix: run a test for requeueing with PreFilterResult correctly 2024-09-07 23:52:45 +09: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
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
carlory
3072987fcc DRA: scheduler: index claim and class parameters to simplify lookup 2024-05-27 15:57:10 +08:00
joey
a56cc6b100 add integration test for pod with pvc has node-affinity to non-existent/existent nodes
Signed-off-by: joey <zchengjoey@gmail.com>
2024-05-03 19:45:31 +08:00
Patrick Ohly
458e227de0 dra scheduler: unit tests
Coverage was checked with a cover profile. The biggest remaining gap is for
isSchedulableAfterClaimParametersChange and
isSchedulableAfterClassParametersChange which will get handled when refactoring
the
foreachPodResourceClaim (https://github.com/kubernetes/kubernetes/issues/123697).
2024-03-22 10:03:22 +01:00
Aleksandra Malinowska
dd1e617ba0 Scheduler first fit (#123384)
* Don't evaluate extra nodes if there's no score plugin defined

* Fix existing unit test (add no op scoring plugin)

* Add unit tests for no score plugin scenario

* address review comments

* add a test with non-filter, non-scoring extender
2024-02-26 11:07:19 -08:00
AxeZhan
630ff96f9d Revert "Scheduler first fit" 2024-02-14 20:43:59 +08:00
Kubernetes Prow Robot
fc691e8ffd Merge pull request #122476 from kerthcet/feat/support-annotation
Support annotation in nodewrapper
2024-01-10 14:05:58 +01:00
kerthcet
bd269e06ba feat: support annotation in nodewrapper
Signed-off-by: kerthcet <kerthcet@gmail.com>
2023-12-25 16:34:10 +08:00
Aleksandra Malinowska
7abba24231 Fix existing unit test (add no op scoring plugin) 2023-12-21 13:30:01 +01:00
Aleksandra Malinowska
e19be41f58 Don't evaluate extra nodes if there's no score plugin defined 2023-12-21 13:29:46 +01:00
AxeZhan
be48c93689 Sched framework: expose NodeInfo in all functions of PluginsRunner interface 2023-12-15 11:30:06 +08:00
Paco Xu
1160521a4f Revert "Scheduler first fit" 2023-12-14 17:27:25 +08:00
Kubernetes Prow Robot
517091cdc5 Merge pull request #122058 from aleksandra-malinowska/scheduler-first-fit
Scheduler first fit
2023-12-14 05:10:19 +01:00
Kubernetes Prow Robot
f4240cbf92 Merge pull request #121953 from utam0k/not-found-pvc-lister
return not-found errors properly from fake listers
2023-12-14 03:53:45 +01:00
Aleksandra Malinowska
feb23ec581 Fix existing unit test (add no op scoring plugin) 2023-11-28 10:42:21 +01:00
Aleksandra Malinowska
199dc03bdd Don't evaluate extra nodes if there's no score plugin defined 2023-11-28 10:39:49 +01:00
kerthcet
e5b86c1034 Fix node update event will miss some potential changes
Signed-off-by: kerthcet <kerthcet@gmail.com>
2023-11-27 15:33:47 +08:00
utam0k
aba817ac1d return not-found errors properly from fake listeres
Signed-off-by: utam0k <k0ma@utam0k.jp>
2023-11-20 19:14:08 +09:00
Kubernetes Prow Robot
fd5c406112 Merge pull request #120933 from mengjiao-liu/contextual-logging-scheduler-remaining-part
kube-scheduler: convert the remaining part to use contextual logging
2023-10-27 10:30:58 +02:00
Kensei Nakada
27bb66fd7b cleanup: rename failedPlugin to plugin in framework.Status 2023-10-25 12:03:56 +00:00
Mengjiao Liu
bd8ac8c7fa kube-scheduler: checked err for golangci-lint 2023-10-24 17:56:59 +08:00
Mengjiao Liu
b0a73213d6 kube-scheduler: convert the remaining part to use contextual logging 2023-10-24 17:56:48 +08:00
olderTaoist
5d5958e338 fix ImageLocality plugin score is inconsistent 2023-10-17 09:38:03 +08:00