Commit Graph

5823 Commits

Author SHA1 Message Date
Antonio Ojea
51f614a156 ipallocator: handle errors correctly
The ipallocator was blindly assuming that all errors are retryable, that
causes that the allocator tries to exhaust all the possibilities to
allocate an IP address.

If the error is not retryable this means the allocator will generate as
many API calls as existing available IPs are in the allocator, causing
CPU exhaustion since this requests are coming from inside the apiserver.

In addition to handle the error correctly, this patch also interpret the
error to return the right status code depending on the error type.

Co-authored-by: carlory <baofa.fan@daocloud.io>
2025-12-03 10:39:57 +00:00
Morten Torkildsen
c33c0464db DRA: Fix flaky integration test 2025-11-25 18:13:00 +00:00
Kubernetes Prow Robot
5bcb759973 Merge pull request #135304 from macsko/fix_failing_sched_perf_tests_on_featuregates
Fix failing scheduler_perf test cases that don't set any feature gate
2025-11-20 10:26:40 -08:00
Kubernetes Prow Robot
0f093c9f49 Merge pull request #134921 from Karthik-K-N/cel-test
Improve CEL Policy Admission test
2025-11-20 10:26:32 -08:00
Karthik Bhat
3e19cc5160 Address review comments 2025-11-19 21:07:28 +05:30
Maciej Skoczeń
04eb121d32 Fix failing scheduler_perf test cases that don't set any feature gate 2025-11-19 10:48:51 +00:00
bwsalmon
854e67bb51 KEP 5598: Opportunistic Batching (#135231)
* First version of batching w/out signatures.

* First version of pod signatures.

* Integrate batching with signatures.

* Fix merge conflicts.

* Fixes from self-review.

* Test fixes.

* Fix a bug that limited batches to size 2
Also add some new high-level logging and
simplify the pod affinity signature.

* Re-enable batching on perf tests for now.

* fwk.NewStatus(fwk.Success)

* Review feedback.

* Review feedback.

* Comment fix.

* Two plugin specific unit tests.:

* Add cycle state to the sign call, apply to topo spread.
Also add unit tests for several plugi signature
calls.

* Review feedback.

* Switch to distinct stats for hint and store calls.

* Switch signature from string to []byte

* Revert cyclestate in signs. Update node affinity.
Node affinity now sorts all of the various
nested arrays in the structure. CycleState no
longer in signature; revert to signing fewer
cases for pod spread.

* hack/update-vendor.sh

* Disable signatures when extenders are configured.

* Update pkg/scheduler/framework/runtime/batch.go

Co-authored-by: Maciej Skoczeń <87243939+macsko@users.noreply.github.com>

* Update staging/src/k8s.io/kube-scheduler/framework/interface.go

Co-authored-by: Maciej Skoczeń <87243939+macsko@users.noreply.github.com>

* Review feedback.

* Disable node resource signatures when extended DRA enabled.

* Review feedback.

* Update pkg/scheduler/framework/plugins/imagelocality/image_locality.go

Co-authored-by: Maciej Skoczeń <87243939+macsko@users.noreply.github.com>

* Update pkg/scheduler/framework/interface.go

Co-authored-by: Maciej Skoczeń <87243939+macsko@users.noreply.github.com>

* Update pkg/scheduler/framework/plugins/nodedeclaredfeatures/nodedeclaredfeatures.go

Co-authored-by: Maciej Skoczeń <87243939+macsko@users.noreply.github.com>

* Update pkg/scheduler/framework/runtime/batch.go

Co-authored-by: Maciej Skoczeń <87243939+macsko@users.noreply.github.com>

* Review feedback.

* Fixes for review suggestions.

* Add integration tests.

* Linter fixes, test fix.

* Whitespace fix.

* Remove broken test.

* Unschedulable test.

* Remove go.mod changes.

---------

Co-authored-by: Maciej Skoczeń <87243939+macsko@users.noreply.github.com>
2025-11-12 21:51:37 -08:00
Heba
aceb89debc KEP-5471: Extend tolerations operators (#134665)
* Add numeric operations to tolerations

Signed-off-by: Heba Elayoty <heelayot@microsoft.com>

* code review feedback

Signed-off-by: Heba Elayoty <heelayot@microsoft.com>

* add default feature gate

Signed-off-by: Heba Elayoty <heelayot@microsoft.com>

* Add integration tests

Signed-off-by: Heba Elayoty <heelayot@microsoft.com>

* Add toleration value validation

Signed-off-by: Heba Elayoty <heelayot@microsoft.com>

* Add validate options for new operators

Signed-off-by: helayoty <heelayot@microsoft.com>

* Remove log

Signed-off-by: helayoty <heelayot@microsoft.com>

* Update feature gate check

Signed-off-by: helayoty <heelayot@microsoft.com>

* emove IsValidNumericString func

Signed-off-by: helayoty <heelayot@microsoft.com>

* Implement IsDecimalInteger

Signed-off-by: helayoty <heelayot@microsoft.com>

* code review feedback

Signed-off-by: helayoty <heelayot@microsoft.com>

* Add logs to v1/toleration

Signed-off-by: Heba Elayoty <heelayot@microsoft.com>
Signed-off-by: helayoty <heelayot@microsoft.com>

* Update integration tests and address code review feedback

Signed-off-by: helayoty <heelayot@microsoft.com>

* Add feature gate to the scheduler framework

Signed-off-by: helayoty <heelayot@microsoft.com>

* Remove extra test

Signed-off-by: helayoty <heelayot@microsoft.com>

* Fix integration test

Signed-off-by: helayoty <heelayot@microsoft.com>

* pass feature gate via TolerationsTolerateTaint

Signed-off-by: helayoty <heelayot@microsoft.com>

---------

Signed-off-by: Heba Elayoty <heelayot@microsoft.com>
Signed-off-by: helayoty <heelayot@microsoft.com>
2025-11-10 12:42:54 -08:00
Kubernetes Prow Robot
183892b2c9 Merge pull request #134870 from pmengelbert/pmengelbert/kuberc/4
Add client-go credential plugin to kuberc
2025-11-09 17:26:53 -08:00
Peter Engelbert
fab280950d Add client-go credential plugin to kuberc
Remove reference to internal types in kuberc types

* Remove unserialized types from public APIs

Also remove defaulting

* Don't do conversion gen for plugin policy types

Because the plugin policy types are explicitly allowed to be empty, they
should not affect conversion. The autogenerated conversion functions for
the `Preference` type will leave those fields empty.

* Remove defaulting tests

Comments and simplifications (h/t jordan liggitt)

Signed-off-by: Peter Engelbert <pmengelbert@gmail.com>
2025-11-09 14:24:53 -05:00
Kubernetes Prow Robot
c3aee79946 Merge pull request #134942 from ttsuuubasa/dra-bc-integration-tests
scheduler: KEP-5007 add integration tests on DeviceBindingConditions
2025-11-07 07:40:53 -08:00
Kubernetes Prow Robot
55ac11aad0 Merge pull request #135149 from ania-borowiec/nnn_test
KEP-5278 Add integration tests for setting and clearing NominatedNodeName
2025-11-07 06:06:53 -08:00
Tsubasa Watanabe
1225ce509e scheduler: KEP-5007 add integration tests
- Rescheduling on binding failure using taints or device removal
- Triggering binding timeout when BindingConditions remain unmet
- Recovery to a device without BindingConditions after binding timeout

Signed-off-by: Tsubasa Watanabe <w.tsubasa@fujitsu.com>
2025-11-07 21:15:13 +09:00
Tsubasa Watanabe
368e699ed2 scheduler: KEP-5007 move BindingConditions integration tests to separate file
To improve maintainability and reduce the size of dra_test.go,
this commit extracts the function "testDeviceBindingConditions"
into a new file: binding_conditions_test.go.
No functional changes are introduced.

Signed-off-by: Tsubasa Watanabe <w.tsubasa@fujitsu.com>
2025-11-07 21:14:50 +09:00
Ania Borowiec
e88aa1e04d Integration tests for setting and clearing NominatedNodeName 2025-11-07 10:42:43 +00:00
Kubernetes Prow Robot
0cfbf89e70 Merge pull request #134189 from mortent/NewUpdatePartitionableDevices
Updates to DRA Partitionable Devices feature
2025-11-06 16:10:53 -08:00
Morten Torkildsen
4d29f88c88 DRA: Update integration tests for Partitionable Devices 2025-11-06 21:30:32 +00:00
Morten Torkildsen
38b5750e33 DRA: Update allocator for Partitionable Devices 2025-11-06 21:30:01 +00:00
Morten Torkildsen
6689fa7b00 DRA: Update ResourceSlice max size tests for Partitionable Devices 2025-11-06 21:13:33 +00:00
Richa Banker
b9e59e8ea9 test: Add integration tests for peer-aggregated discovery
Add comprehensive integration tests covering:
- Peer-aggregated discovery merging across multiple API servers
- CRD/APIService exclusion from peer discovery
- Profile-based content negotiation (nopeer)
- Cache invalidation on local discovery changes
- Request routing to peer servers

Part of KEP-4020: Unknown Version Interoperability Proxy
2025-11-06 12:48:22 -08:00
Kubernetes Prow Robot
14134e03a8 Merge pull request #134058 from bart0sh/PR200-DRA-scoring-extended-resources
Implement scoring for extended resources backed up by DRA
2025-11-06 11:50:52 -08:00
Ed Bartosh
fc404b6a3d Cache DRA state for scoring extended resources
Extend Fit and BalancedAllocation PreScore state with the the
allocated state, the list of ResourceSlices and the device class
mapping. Gather these once during PreScore and pass them through
the scoring path instead of re-fetching for every scoring call.

This should speed up scoring of DRA extended resources, lowering
scheduling overhead.

Co-authored-by: Patrick Ohly <patrick.ohly@intel.com>
Co-authored-by: Maciej Skoczeń <mskoczen@google.com>
Co-authored-by: Dominik Marciński <gmidon@gmail.com>
2025-11-06 18:09:11 +02:00
Ed Bartosh
bf7dbb129f DRA: test performance for scoring extended resources 2025-11-06 15:28:43 +02:00
Kubernetes Prow Robot
f41e30e7e0 Merge pull request #134722 from macsko/gang_scheduling_scheduler
KEP-4671: Implement Gang scheduling in kube-scheduler
2025-11-06 05:12:53 -08:00
Kubernetes Prow Robot
7e1e2163d4 Merge pull request #135137 from pohly/dra-scheduler-perf-filenames
DRA scheduler_perf: write JSON where perf-dash expects it
2025-11-06 03:36:56 -08:00
Maciej Skoczeń
049cb8558e Add integration test for gang scheduling 2025-11-06 10:47:30 +00:00
Maciej Skoczeń
c086bdeaa2 Add integration tests for gang queueing 2025-11-06 10:47:30 +00:00
Maciej Skoczeń
9639274676 api: Create Workload API 2025-11-06 09:36:43 +00:00
Kubernetes Prow Robot
b869afe68d Merge pull request #133389 from pravk03/node-capabilities
Introduce node declared features framework
2025-11-06 01:32:54 -08:00
Kubernetes Prow Robot
50b4bcbab5 Merge pull request #134210 from yliaog/admit_quota
DRA extended resource quota
2025-11-06 00:42:53 -08:00
Patrick Ohly
95a59d0cfb DRA scheduler_perf: write JSON where perf-dash expects it
BenchmarkPerfSchedulingExperimental_benchmark_dra_experimental_2025-11-05T07:10:33Z.json
is ignored by perf-dash. It probably needs to be called
BenchmarkPerfScheduling_benchmark_*.
2025-11-06 08:34:31 +01:00
Kubernetes Prow Robot
ca03752ee7 Merge pull request #135104 from mimowo/mutable-job-directives
Allow mutable job scheduling directives on suspended Jobs
2025-11-05 21:57:11 -08:00
Kubernetes Prow Robot
f465916b85 Merge pull request #134790 from yt2985/podcertificate-e2e
Promote Pod Certificates feature to beta-with metrics/events and e2e tests.
2025-11-05 21:56:57 -08:00
Kubernetes Prow Robot
f025bcace9 Merge pull request #135068 from pohly/dra-device-taints-1.35-full
DRA device taint eviction: several improvements
2025-11-05 18:52:58 -08:00
Praveen Krishna
6b949e7993 Add integration test for admission controller. 2025-11-06 01:21:17 +00:00
Praveen Krishna
c06297b329 Add integration test for kube-scheduler plugin. 2025-11-06 01:21:17 +00:00
yliao
870062df4f adjusts DRA extended resource quota to include devices usages from regular resource claims 2025-11-05 23:24:24 +00:00
Kubernetes Prow Robot
738475f9e2 Merge pull request #134991 from yliaog/class_events
added device class add/update events to noderesources plugin when DRAExtendedResource feature is enabled
2025-11-05 14:16:51 -08:00
Kubernetes Prow Robot
799572b8db Merge pull request #134711 from mortent/SimpleScoringForPrioritizedList
DRA: Add scoring for Prioritized List feature
2025-11-05 12:36:51 -08:00
Michał Woźniak
5a7c90fb76 Allow mutable scheduling directives for suspended Jobs 2025-11-05 19:37:33 +00:00
Kubernetes Prow Robot
36622966a8 Merge pull request #132441 from kannon92/poc-job-relax-pod-template
[KEP-5440]: MutablePodResourcesForSuspendedJobs
2025-11-05 11:26:50 -08:00
Patrick Ohly
eaee6b6bce DRA device taints: add separate feature gate for rules
Support for DeviceTaintRules depends on a significant amount of
additional code:
- ResourceSlice tracker is a NOP without it.
- Additional informers and corresponding permissions in scheduler and controller.
- Controller code for handling status.

Not all users necessarily need DeviceTaintRules, so adding a second feature
gate for that code makes it possible to limit the blast radius of bugs in that
code without having to turn off device taints and tolerations entirely.
2025-11-05 20:03:17 +01:00
tinatingyu
3f8444210c Add e2e tests, metrics and events for podcertificaterequests v1beta1 2025-11-05 18:12:39 +00:00
Morten Torkildsen
fbfeb33231 DRA: Add scoring for Prioritized List feature 2025-11-05 17:18:38 +00:00
Kevin Hannon
7db5311952 feat: Add MutablePodResourcesForSuspendedJobs feature gate
- Add feature gate to control mutable pod resources for suspended jobs
- Implement validatePodResourceUpdatesOnly function to allow only container resource updates
- Allow resource updates for suspended jobs regardless of whether they have started
- Add comprehensive unit and integration tests for all scenarios including started-then-suspended
- Ensure backward compatibility when feature gate is disabled

This enables users to update container resources on suspended jobs, including jobs that
have previously started and been suspended, while maintaining immutability for all other
pod template fields.
2025-11-05 10:38:05 -05:00
Kubernetes Prow Robot
c727585676 Merge pull request #134216 from Goend/master
fixed the CRD statusResetFields init issue
2025-11-05 00:44:52 -08:00
Goend
3b0913c866 fix test case 2025-11-05 11:17:00 +08:00
Kubernetes Prow Robot
5fd9cefd95 Merge pull request #134995 from yongruilin/flagz-kk-structure
[KEP-4828] Flagz versioned structured response
2025-11-04 19:02:04 -08:00
Kubernetes Prow Robot
3d595e3691 Merge pull request #134803 from enj/enj/f/constrained_impersonation
KEP-5284: Implement Constrained Impersonation
2025-11-04 15:32:23 -08:00
Kubernetes Prow Robot
c1a6a3ca71 Merge pull request #134152 from pohly/dra-device-taints-1.35
DRA: device taints: new ResourceSlice API, new features
2025-11-04 15:32:07 -08:00