Patrick Ohly
5cea72d564
DRA integration: add test case for FilterTimeout
...
This covers disabling the feature via the configuration, failing to schedule
because of timeouts for all nodes, and retrying after ResourceSlice changes with
partial success (timeout for one node, success for the other).
While at it, some helper code gets improved.
2025-07-17 21:18:28 +02:00
Patrick Ohly
bc338e7505
DRA scheduler: implement filter timeout and cancellation
...
The intent is to catch abnormal runtimes with the generously large default
timeout of 10 seconds.
We have to set up a context with the configured timeout (optional!), then
ensure that both CEL evaluation and the allocation logic itself properly
returns the context error. The scheduler plugin then can convert that into
"unschedulable".
The allocator and thus Filter now also check for context cancellation by the
scheduler. This happens when enough nodes have been found.
2025-07-17 21:18:28 +02:00
Patrick Ohly
025c606e39
DRA scheduler: add plugin configuration
...
The only option is the filter timeout.
The implementation of it follows in a separate commit.
2025-07-17 16:47:47 +02:00
Patrick Ohly
ee38a00131
DRA scheduler: add DRASchedulerFilterTimeout feature gate
...
Initializing the scheduler Features struct will be needed in different places,
therefore NewSchedulerFeaturesFromGates gets introduced. Besides, having it
next to the struct makes it easier to add new features.
The DRASchedulerFilterTimeout feature gate simplifies disabling the timeout
because setting a feature gate is often easier than modifying the scheduler
configuration with a zero timeout value.
The timeout and feature gate are new. The gate starts as beta and enabled by
default, which is consistent with the "smaller changes with low enough risk
that still may need to be disabled..." guideline.
2025-07-17 16:47:47 +02:00
Patrick Ohly
837ef29f5a
scheduler: enhance and document Filter cancellation
...
When using context.CancelCause in the scheduler and context.Cause in plugins,
the status returned by plugins is more informative than just "context
canceled".
Context cancellation itself is not new, but many plugin authors probably
weren't aware of it because it wasn't documented.
2025-07-17 16:47:47 +02:00
yliao
dd3691b169
refactor allocator, removed claimsToAllocate from NewAllocator(), instead, passed it through Allocate()
2025-07-16 15:11:11 +00:00
Kubernetes Prow Robot
ab685237f0
Merge pull request #132391 from sanposhiho/pre-bind-pre-flight
...
feat: add PreBindPreFlight and implement in in-tree plugins
2025-07-15 04:06:23 -07:00
Kubernetes Prow Robot
e3b20c07d6
Merge pull request #132870 from pohly/dra-allocator
...
DRA: refactor claim allocator
2025-07-15 01:28:29 -07:00
xiaoweim
0d8fd61e64
address review comments
2025-07-14 21:10:37 +00:00
xiaoweim
61542e7a98
Cleanup: Remove field name from invalid field detail message
2025-07-14 18:13:00 +00:00
Kubernetes Prow Robot
b266ac2c3e
Merge pull request #132840 from ppmechlinski/increase-volume-binder-verbosity
...
Increase verbosity of frequently printed loglines in binder plugin
2025-07-14 03:44:30 -07:00
Omar Nasser
45c355ca58
Move unschedulablePods struct to a separate file
2025-07-11 19:48:11 +03:00
Patrick Ohly
5caf7bca15
DRA allocator: refactor code
...
The goal is to maintain different version of the allocator logic. We already
had one incidence where adding an alpha feature caused a regression also when
it was disabled. Not everything can be implemented within obviously correct if
branches.
This also opens the door for implementing different alternatives.
The code just gets moved around for now.
2025-07-10 17:34:21 +02:00
Pawel Mechlinski
f2b24b9849
Increase verbosity of frequently printed loglines in binder plugin
2025-07-09 12:10:10 +00:00
Junhao Zou
1b730abf8d
cleanup: use HandleErrorWithXXX instead of logger.Error where errors are intentionally ignored
2025-07-08 09:34:49 +08:00
Kensei Nakada
ebae419337
feat: add PreBindPreFlight and implement in in-tree plugins
2025-07-05 17:14:21 -07:00
Ania Borowiec
ee8c265d35
Move Code and Status from pkg/scheduler/framework to k8s.io/kube-scheduler/framework
2025-06-30 10:06:22 +00:00
Ania Borowiec
00d3750503
Move ClusterEvent type to staging repo, leaving some functions (that contain logic internal to scheduler) in kubernetes/kubernetes ( #132190 )
...
* Move ClusterEvent type to staging repo, leaving some functions (that contain logic internal to scheduler) in kubernetes/kubernetes
apply review comment and fix linter warning
* update-vendor.sh
* update doc comments
* run update-vendor.sh
2025-06-26 08:06:29 -07:00
Davanum Srinivas
03afe6471b
Add a replacement for cmp.Diff using json+go-difflib
...
Co-authored-by: Jordan Liggitt <jordan@liggitt.net >
Signed-off-by: Davanum Srinivas <davanum@gmail.com >
2025-06-16 17:10:42 -04:00
Kubernetes Prow Robot
2d1bb8dac1
Merge pull request #132040 from avrittrohwer/master
...
Make nodeports scheduling plugin restartable initContainer aware
2025-06-10 17:39:02 -07:00
Kubernetes Prow Robot
5090812df4
Merge pull request #132103 from nojnhuh/typed-ring-buffer
...
Replace queue.FIFOs with k8s.io/utils/buffer.Ring
2025-06-06 10:26:39 -07:00
carlory
0896693693
fix TestNodeAffinityPriority: calculate the priorities correctly even if PreScore is not called
2025-06-06 16:03:46 +08:00
Avritt Rohwer
087554448c
Make nodeports scheduling plugin sidecar initContainer aware
2025-06-06 02:26:05 +00:00
Jon Huhn
7d47165e3e
Replace queue.FIFOs with k8s.io/utils/buffer.Ring
2025-06-04 13:48:11 -05:00
Kubernetes Prow Robot
e0859f91b7
Merge pull request #131887 from ania-borowiec/extract_cyclestate_interface
...
Moving Scheduler interfaces to staging: split CycleState into interface and implementation, move interface to staging repo
2025-05-30 04:00:18 -07:00
Ania Borowiec
d75af825fb
Extract interface CycleState and move is to staging repo. CycleState implementation remains in k/k/pkg/scheduler/framework
2025-05-29 16:18:36 +00:00
Kensei Nakada
f694c58c6c
feat: graduate QueueingHint to GA
2025-05-26 21:23:46 +02:00
Maciej Skoczeń
157903b09b
Skip backoff when PodMaxBackoffDuration is set to zero
2025-05-26 09:35:53 +00:00
Kubernetes Prow Robot
86da819709
Merge pull request #131693 from ania-borowiec/staging_repo_refactoring_action_type
...
Remove package protected fields from ActionType
2025-05-23 05:30:35 -07:00
googs1025
01820ff7c2
chore(scheduler): add filter integration tests for missing part plugins: NodeAffinity plugin
...
Signed-off-by: googs1025 <googs1025@gmail.com >
2025-05-23 18:02:32 +08:00
Ania Borowiec
151d9d79f4
Remove package protected field updatePodOther from ActionType. Make ActionType.None public
2025-05-23 09:51:35 +00:00
Kubernetes Prow Robot
0afe2b839d
Merge pull request #129983 from nickbp/master
...
feature(scheduler): Customizable pod selection and ordering in DefaultPreemption plugin
2025-05-20 05:09:15 -07:00
Kubernetes Prow Robot
82db38a23c
Merge pull request #128748 from sanposhiho/attempt-incre
...
feat: introduce pInfo.UnschedulableCount to make the backoff calculation more appropriate
2025-05-19 01:21:15 -07:00
Kensei Nakada
adc4916dfe
feat: introduce pInfo.UnschedulableCount to make the backoff calculation more appropriate
2025-05-17 12:39:58 +02:00
Nicholas Parker
7bccb1acb5
Update pkg/scheduler/framework/plugins/defaultpreemption/default_preemption.go
...
Co-authored-by: Dominik Marciński <gmidon@gmail.com >
2025-05-16 13:12:13 +12:00
Kensei Nakada
a1a4bc8fec
fix: add BackoffExpiration to DeepCopy
2025-05-15 02:23:51 +02:00
Kubernetes Prow Robot
b587977f7c
Merge pull request #131445 from natasha41575/renameObservedGenHelperFns
...
update godoc for and rename observedGeneration helpers
2025-05-14 11:39:19 -07:00
Kubernetes Prow Robot
2a3ca42c91
Merge pull request #131345 from haosdent/haosdent/return-unresolvable-when-exceed-node-resources
...
scheduler: return UnschedulableAndUnresolvable when node capacity is insufficient
2025-05-14 05:13:25 -07:00
Kubernetes Prow Robot
0113538e59
Merge pull request #127180 from sanposhiho/general-gate
...
feat: introduce pInfo.GatingPlugin to filter out events more generally
2025-05-14 05:13:18 -07:00
Nicholas Parker
28602c66fc
Update pkg/scheduler/framework/plugins/defaultpreemption/default_preemption_test.go
...
Co-authored-by: Maciej Skoczeń <87243939+macsko@users.noreply.github.com >
2025-05-13 06:56:27 +12:00
Nick Parker
52e7aa37da
gofmt
2025-05-13 06:56:27 +12:00
Nick Parker
a507e64fe4
Have separate tests for custom selection vs ordering, add comments around system pod eligibility
2025-05-13 06:56:27 +12:00
Nick Parker
283c5e6b61
Have IsEligiblePod be supplemental to priority check, update tests
2025-05-13 06:56:27 +12:00
Nick Parker
3ed73e058a
Clean up the affinity explanation, fix for new lint rule
2025-05-13 06:56:27 +12:00
Nick Parker
d4bc527a7b
Update comments: affinity info, default behavior, priority->importance
2025-05-13 06:56:27 +12:00
Nicholas Parker
95ebc2c10e
Apply suggestions from code review
...
Co-authored-by: Dominik Marciński <gmidon@gmail.com >
2025-05-13 06:56:27 +12:00
Nick Parker
7f57c6e52d
Update factory to use generics, keep single New function
2025-05-13 06:56:27 +12:00
Nick Parker
137da6a488
Remove line about equal priority, fix typo
2025-05-13 06:56:27 +12:00
Nicholas Parker
b8ac171437
Apply suggestions from code review
...
Co-authored-by: Dominik Marciński <gmidon@gmail.com >
2025-05-13 06:56:27 +12:00
Nick Parker
224e6a3a35
Rename EligiblePod* to IsEligiblePod*
2025-05-13 06:56:27 +12:00