Commit Graph

1547 Commits

Author SHA1 Message Date
John Belamaric
6bd05d64c7 Fix DRA scoring bug with mixed allocated and unallocated claims 2026-05-28 13:03:36 -05:00
Kubernetes Prow Robot
da97d71f14 Merge pull request #137897 from nojnhuh/dra-gang
scheduler: fix race in DRA pending allocation sharing
2026-03-24 23:40:18 +05:30
Jon Huhn
61cf993c6b scheduler: fix race in DRA pending allocation sharing 2026-03-24 12:07:31 -05:00
Antoni Zawodny
ccaaf9d3a5 Marry WAP logic with the new API fields 2026-03-24 09:36:00 +01:00
Kubernetes Prow Robot
07311a2afa Merge pull request #137606 from Argh4k/workload-preemption-v1alpha2
Add workload aware preemption
2026-03-24 00:32:16 +05:30
Maciej Wyrzuc
1f15743e49 Add pod group preemption 2026-03-23 16:22:32 +00:00
Jon Huhn
d80f384b70 Workload API: PodGroup ResourceClaims (KEP-5729) 2026-03-22 14:52:45 -05:00
Kubernetes Prow Robot
ef247770b5 Merge pull request #137190 from everpeace/KEP-5491-alpha
KEP-5491: DRA: List Types for Attributes [Alpha]
2026-03-21 14:18:12 +05:30
Nour
aa5e5ea9d6 scheduler: use contextual logging for event emission
Signed-off-by: Nour <nurmn3m@gmail.com>
2026-03-19 14:33:09 +02:00
Shingo Omura
9b45256ba3 KEP-5491: introduce "includes" CEL function that can work both for scalar and list attributes 2026-03-19 16:24:38 +09:00
Jon Huhn
71f02bb2f3 DRA: fix Pods in a scheduling gang sharing ResourceClaims 2026-03-18 17:30:19 -05:00
Kubernetes Prow Robot
7a3a6cf4be Merge pull request #136725 from pravk03/native-dra-2
Introduce support of DRA for Native Resources
2026-03-19 03:36:38 +05:30
Praveen Krishna
3cd22dcb4f Verify that assumed pod NodeAllocatableResourceClaimStatuses matches the status to patch. 2026-03-18 19:20:11 +00:00
Praveen Krishna
11c8bf1f13 Cleanup NodeAllocatableDRAClaimStatus in Unreserve 2026-03-18 19:20:11 +00:00
Praveen Krishna
cdcfc4eeb3 Add integration tests. 2026-03-18 19:20:10 +00:00
Praveen Krishna
a84f938404 Validate Pod resources cover container and DRA requests. 2026-03-18 19:20:10 +00:00
Praveen Krishna
628365297a Add validation check to disallow node-allocatable resource claim sharing. 2026-03-18 19:20:10 +00:00
Praveen Krishna
9e22d7b033 Include node-allocatable claims in kubelet admission check 2026-03-18 19:20:10 +00:00
Praveen Krishna
af186d3534 Implement changes in DRA Plugin to handle node-allocatable claims
* Filter: Calculate the pod's total resource footprint by combining spec requests and DRA allocations, respecting accounting policies. Perform node resource fit checks. Cache the resulting NodeAllocatableResourceClaimStatus in CycleState.
* PreBind: Retrieve result from CycleState and patch it into Pod.Status.
2026-03-18 19:17:30 +00:00
vshkrabkov
5ea4532969 Add PodGroupPodsCount placement score scheduler plugin (#137488)
* placement score plugin, grounded on count of scheduled pods and pods for placement

* align with v1alpha2 api changes

* addressing review comments

* plugin renaming
2026-03-18 23:20:57 +05:30
Kubernetes Prow Robot
0d28578de1 Merge pull request #137795 from ttsuuubasa/dra-binding-conditions-beta
DRA Device Binding Conditions: graduate to beta
2026-03-18 19:18:33 +05:30
Kubernetes Prow Robot
5953c57c6b Merge pull request #137607 from 0xMH/fix/133531-dra-queueing-hint
DRA: return error on filter timeout instead of unschedulable
2026-03-18 14:26:31 +05:30
Tsubasa Watanabe
57e649ae03 DRA Device Binding Conditions: update unit and integration tests
- update expectations for the default BindingTimeout in KubeSchedulerConfiguration
- DRA unit tests:
  - enable DRADeviceBindingConditions by default
  - add allocationTimestamp to expected ResourceClaims for PreBind cases
- disable DRADeviceBindingConditions when testing the stable allocator in TestSchedulerPerf

Signed-off-by: Tsubasa Watanabe <w.tsubasa@fujitsu.com>
2026-03-18 13:44:30 +09:00
Hamza
67deec3bfa DRA: include node name in timeout error and rework FilterTimeout test setup 2026-03-18 04:33:24 +01:00
Bartosz
d9da8c7c4a Add scheduling constraints to v1alpha2 pod group api
Add plugin to generate placements based on scheduling constraints

Co-authored-by: Antoni Zawodny <zawodny@google.com>
2026-03-17 13:27:46 +00:00
Kubernetes Prow Robot
d763ae8f6f Merge pull request #137073 from iomarsayed/snapshot-podgroup-state-before-scheduling-cycle
Snapshot PodGroup state before initiating scheduling cycle
2026-03-16 23:37:48 +05:30
Kubernetes Prow Robot
ac976cf6a1 Merge pull request #136652 from brejman/kep-5732-tas-placement-plugin-config
Extend NodeResourcesFit plugin to score placements in the PodGroup scheduling cycle
2026-03-16 23:37:40 +05:30
Bartosz
9533a4eddb Implement PlacementScorePlugin in NodeResourcesFit 2026-03-16 15:13:46 +00:00
Kubernetes Prow Robot
1817e10998 Merge pull request #136185 from tallclair/ndf-bitmap
Optimize NodeDeclaredFeatures with a bitmap FeatureSet implementation
2026-03-14 06:37:34 +05:30
Omar Sayed
e1b18e34ff snapshot pod group state before scheduling cycle and embed pod group manager into cache 2026-03-13 21:44:17 +00:00
Patrick Ohly
85bca3b684 DRA device taints: fix beta-enabled, alpha-disable configurations
DeviceTaintRule is off by default because the corresponding v1beta2 API group
is off. When enabled, the potentially still disabled v1alpha3 API version was
used instead of the new v1beta2, causing the scheduler to fail while setting up
informers and then not scheduling pods.
2026-03-13 09:20:57 +01:00
Tim Allclair
b1b75f93d7 Make size explicit; switch to binary string format 2026-03-13 04:28:16 +00:00
Tim Allclair
1c2b07fa22 Avoid computing feature diff when not necessary 2026-03-13 04:28:16 +00:00
Tim Allclair
f91f641a65 Switch to bitmapped FeatureSet implementation. 2026-03-13 04:28:16 +00:00
Tim Allclair
e4521526b4 NodeDeclaredFeatures: Add global default NDF registry 2026-03-13 04:28:16 +00:00
Kubernetes Prow Robot
9874e76ac4 Merge pull request #137662 from tosi3k/revert-136254-extend-postfilter
Revert "Extend PostFilterResult with a list of victim Pods"
2026-03-12 17:33:42 +05:30
Antoni Zawodny
fa29c9db6a Revert "Extend PostFilterResult with a list of victim Pods" 2026-03-12 10:03:35 +01:00
Tsubasa Watanabe
30b811a99b DRA Device Binding Conditions: add metrics for prebind flow
This commit introduces metrics and improves log outputs for
DRA Device Binding Conditions (KEP-5007):

- scheduler_dra_bindingconditions_allocations_total

  Counts the number of per-device scheduling attempts
  during PreBind where BindingConditions are in use

- scheduler_dra_bindingconditions_wait_duration_seconds

  Observes the time spent waiting for BindingConditions
  to be satisfied during PreBind.

Signed-off-by: Tsubasa Watanabe <w.tsubasa@fujitsu.com>
2026-03-12 17:19:13 +09:00
Kubernetes Prow Robot
031f8ac9ed Merge pull request #136287 from abel-von/optimize-podgroupinfo
scheduler: optimize podGroupInfo to minimize the lock time
2026-03-12 12:41:34 +05:30
Kubernetes Prow Robot
802b3f744b Merge pull request #133622 from KunWuLuan/feat/volume-limit-acc
Use indexer to acclerate volume limit plugin
2026-03-12 11:27:34 +05:30
Abel Feng
2153ed1852 scheduler: optimize podGroupInfo to minimize the lock time
Gang scheduler will add the pod into the podGroupInfo before pod
enqueue, if there are thousands of pods in a podGroupInfo, The
call of AssumedPods, AssignedPods and AllPods will hold the lock and
clone the map, so that new Pods should wait there for a long time to add into
the podGroupInfo, also it will be a long wait to enqueue the pod.

In our test, a pod will wait seconds to enqueue if we have 50000 pod in
a gang group.

In this PR, we can avoid the traverse and clone of the map by adding
AllPodsCount, AssumedPodsCount, AssignedPodsCount method, and we make
sure that assumed pods and assigned pods are disjoint.
2026-03-11 17:21:36 +08:00
Hamza
0680960e5e Return Error from DRA filter on timeout to enable automatic retry 2026-03-11 02:20:30 +01:00
Kubernetes Prow Robot
d47f3f253b Merge pull request #137343 from gnufied/prevent-podscheduling-optin
Add API changes to prevent pod scheduling via CSIDriver object
2026-03-11 03:53:17 +05:30
Kubernetes Prow Robot
69144c9081 Merge pull request #137371 from pohly/dra-bind-claim-panic
DRA scheduler: fix potential panic when DRABindingConditions are enabled
2026-03-11 03:03:25 +05:30
Patrick Ohly
f33176fc00 DRA scheduler: add unit tests for AllocationTimestamp
The code paths for adding AllocationTimestamp were not tested well. None of
the test cases verified that an AllocationTimestamp gets added at all because
go-cmp was instructed to ignore the unpredictable field.

We can do better than that and at least check for existence by normalizing all
non-nil time stamps to the empty time. This affects all tests where the binding
conditions and thus AllocationTimestamp support is enabled.

The retry loop for status updates was untested. The fake client has to return a
conflict status error to trigger it. This enables writing a test case where a
concurrent deallocation would have caused the nil panic without the previous
fix.

For binding conditions, one test case gets added which runs through the full
flow of allocating a claim and trying to bind it. All other test cases seem to
have started with the claim already allocated.

Altogether this increases coverage from 82.4% to 83.7%.
2026-03-10 16:25:53 +01:00
Antoni Zawodny
3f094dc228 Create Workload API v1alpha2 (#136976)
* Drop WorkloadRef field and introduce SchedulingGroup field in Pod API

* Introduce v1alpha2 Workload and PodGroup APIs, drop v1alpha1 Workload API

Co-authored-by: yongruilin <yongrlin@outlook.com>

* Run hack/update-codegen.sh

* Adjust kube-scheduler code and integration tests to v1alpha2 API

* Drop v1alpha1 scheduling API group and run make update

---------

Co-authored-by: yongruilin <yongrlin@outlook.com>
2026-03-10 07:59:10 +05:30
Kubernetes Prow Robot
7bec24fbb3 Merge pull request #137475 from troychiu/flaky-test-extended-resource-name-no-resource
Fix scheduler flaky test: wait for DeviceClass cache sync in dynamicresources tests
2026-03-10 02:59:11 +05:30
Troy Chiu
1d2165b29c Fix scheduler flaky test: wait for DeviceClass cache sync in dynamicresources tests
When DRAExtendedResource is enabled, the dynamicresources test setup
registers an event handler for DeviceClasses but was not waiting for it
to sync. This can lead to flaky tests where the cache is not fully
populated when the test starts.

This change captures the event handler registration and includes its
DoneChecker in a WaitFor call.
2026-03-09 19:24:13 +00:00
Hemant Kumar
e1a97a780d Update scheduler to check PreventPodSchedulingIfMissing 2026-03-09 12:55:17 -04:00
Kubernetes Prow Robot
f5bafe93ac Merge pull request #135048 from yliaog/beta_promo
DRA Extended Resource: promote to Beta in 1.36
2026-03-07 01:12:19 +05:30