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
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
Nick Parker
4bf6841495
Update the customizations to operate on individual pods, for more flexibility later
2025-05-13 06:56:27 +12:00
Nick Parker
c34f8db559
Remove unnecessary context and typecheck, switch to cmp.Diff
2025-05-13 06:56:27 +12:00
Nick Parker
c6f2d3879b
Fix gofmt in default_preemption_test.go
2025-05-13 06:56:26 +12:00
Nick Parker
78b059c064
rename OrderedPods -> OrderPods
2025-05-13 06:56:26 +12:00
Nick Parker
2616202ac9
Implement tests with example customizations, add direct constructor
2025-05-13 06:56:26 +12:00
Nick Parker
760daaf110
feature(scheduler): Custom pod selection/ordering in DefaultPreemption
...
The current behavior is to select only based on pod priority, where any
pod with higher priority can preempt any pod with lower priority.
In our case, we have multiple priority classes but where only a subset
of those are considered preemptible. Here's roughly how this looks:
- High priority: higher in the scheduling queue, not preemptible
- Low priority: lower in the scheduling queue, not preemptible
- Preemptible priority: lowest in the scheduling queue, preemptible
This PR allows the preemption selection to be configured against the
`DefaultPreemption` plugin, rather than needing to reimplement the
plugin itself. The structure used here mimics [what's currently being
done for the `Evaluator`](https://github.com/kubernetes/kubernetes/blob/release-1.32/pkg/scheduler/framework/preemption/preemption.go#L161-L165 ),
where a `PreemptPod` callback may be overridden to customize what
happens when performing a preemption.
This PR also updates the plugin's tests to call the updated `New()`
function rather than constructing `DefaultPreemption` directly, so
that `New()` is now being exercised in tests.
2025-05-13 06:56:26 +12:00
Kensei Nakada
5140786829
feat: improve the backoff calculation to o(1)
2025-05-12 01:26:47 +02:00
Kensei Nakada
d28c8cd488
fix: not removing the plugin from the unsched plugins after PreEnqueue
2025-05-07 14:12:23 +02:00
Kensei Nakada
47d296d62d
feat: introduce pInfo.GatingPlugin to filter out events more generally
2025-05-07 13:54:47 +02:00
dom4ha
97a2cb39ce
Make sig-scheduling-api-approvers actual approvers
2025-05-06 15:37:57 +00:00
dom4ha
6d927c3c25
Comment out sig-scheduling-api-reviewers, since it's currently empty.
2025-05-06 15:15:03 +00:00
googs1025
6c89041043
fix(scheduler): node pre-check logic to consider NoExecute taint effect
...
Signed-off-by: googs1025 <googs1025@gmail.com >
2025-05-05 22:08:05 +08:00
Ania Borowiec
1b9386aac3
Add comment explaining the metric sampling logic for plugin execution metrics
...
I have just spent some time finding the change that introduced this and reading the discussion in the relevant PR. I assume this comment could save some time for other people new to this code
2025-04-30 12:17:33 +02:00
Natasha Sarkar
92359cdc69
update godoc for and rename observedGeneration helpers
2025-04-24 16:05:01 +00:00
Kubernetes Prow Robot
71e7f9eba7
Merge pull request #131425 from carlory/follow-up-128810
...
Remove deprecated scheduler cache metrics
2025-04-24 04:56:29 -07:00
carlory
24257f2d31
Remove deprecated scheduler cache metrics
2025-04-24 11:45:38 +08:00
Kubernetes Prow Robot
75c640bc02
Merge pull request #131278 from haosdent/haosdent/remove-redundant-call
...
scheduler: remove duplicate nominatedNodeName clearing in preemption
2025-04-23 18:20:30 -07:00
Kubernetes Prow Robot
8cdc67c7fd
Merge pull request #130966 from sanposhiho/patch-16
...
chore: correct the comment on UnschedulablePlugins
2025-04-23 13:31:57 -07:00
Kubernetes Prow Robot
8a6b916765
Merge pull request #130720 from saintube/scheduler-expose-nodeinfo-in-prefilter
...
Expose NodeInfo to PreFilter plugins
2025-04-23 13:31:29 -07:00
Kubernetes Prow Robot
04b1ef3624
Merge pull request #129145 from ialidzhikov/fix/confusing-err-message
...
kube-scheduler: Fix a misleading error message in the VolumeRestrictions plugin
2025-04-23 13:30:45 -07:00
Haosdent Huang
f63702de0f
scheduler: return UnschedulableAndUnresolvable when node capacity is insufficient
...
Currently, the NodeResourcesFit plugin always returns Unschedulable when a pod's
resource requests exceed a node's available resources. However, when a pod's
requests exceed the node's total allocatable, preemption cannot help since even
an empty node would not have enough resources.
This change modifies the NodeResourcesFit plugin to return UnschedulableAndUnresolvable
when a pod's resource requests exceed the node's total allocatable. This helps
optimize the scheduling process in large clusters by:
1. Reducing the number of candidate nodes that need to be considered for preemption
2. Providing clearer feedback about unresolvable resource constraints
3. Improving scheduling performance by avoiding unnecessary preemption calculations
The change is particularly beneficial in heterogeneous clusters where node sizes
vary significantly, as it helps quickly identify nodes that are fundamentally
too small for certain pods.
Fixes https://github.com/kubernetes/kubernetes/issues/131310
Co-authored-by: Kensei Nakada <handbomusic@gmail.com >
2025-04-22 14:54:40 +08:00