Commit Graph

24700 Commits

Author SHA1 Message Date
Ed Bartosh
edbc32fa60 DRA: implement scoring for extended resources
Updated extended resource allocation scorer to calculate
allocatable and requested values for DRA-backed resources.
2025-11-06 10:40:52 +02:00
Kubernetes Prow Robot
0cd85c6fe1 Merge pull request #135123 from yongruilin/fix-ratcheting
feat(validation-gen): Improve ratcheting logic for nil vs. uncorrelated fields
2025-11-05 22:48:57 -08:00
Kubernetes Prow Robot
2ab10e6ba6 Merge pull request #135155 from jpbetz/fix-additionalproperties-npe
Fix NPE in CEL schema wrappers of additionalProperties=true objects
2025-11-05 21:57:18 -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
yongruilin
47fb373c31 run update-codegen.sh 2025-11-06 00:54:52 +00:00
yongruilin
a5a2cfdb35 fix(validation-gen): Correct ratcheting for uncorrelated old values
The validation ratcheting logic failed to distinguish between a field that was explicitly nil and a field that was absent in the old object (uncorrelated). safe.Field() returns nil in both scenarios.

This caused validation to be incorrectly skipped for oldObj that cannot be found during an update, as the logic treated the (nil, nil) old/new value pair as unchanged.

This commit introduces an oldValueCorrelated boolean flag to the generated validation functions. This flag is set to false when the parent of the old object is nil, signaling that a corresponding old value could not be found. The ratcheting check is now conditioned on this flag, ensuring that validation proceeds correctly.
2025-11-06 00:54:48 +00:00
Kubernetes Prow Robot
cf37f0bf49 Merge pull request #135037 from yliaog/extendedresourcecache
pick one device class deterministically for extended resource
2025-11-05 14:16:58 -08:00
Joe Betz
da6d15adf6 Fix NPE in CEl accessors of additionalProperties=true objects 2025-11-05 15:46:36 -05: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
yongruilin
030d72959e feat(validation-gen): Refactor testscheme and add ratcheting bug tests
Refactors the ValidationTester in testscheme to make update validation implicit. Calling .OldValue() now automatically triggers update validation, removing the need to pass an explicit operation type and simplifying the test-writing API.

This is applied to new tests that demonstrate a validation ratcheting bug where validation is incorrectly skipped when comparing a nil old value with a new value. The tests cover list items and struct fields to ensure the fix will be verified.
2025-11-05 20:09:08 +00: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
Kubernetes Prow Robot
3395c5358c Merge pull request #135012 from gnufied/volume-limits-redux-cas
Do not schedule pods to a node without CSI driver
2025-11-05 09:42:58 -08:00
Kubernetes Prow Robot
6bcac876f8 Merge pull request #134230 from Jefftree/agg-v2beta1-lock
Lock AggregatedDiscoveryRemoveBetaType to true
2025-11-05 09:42:51 -08:00
Morten Torkildsen
fbfeb33231 DRA: Add scoring for Prioritized List feature 2025-11-05 17:18:38 +00:00
Kubernetes Prow Robot
26a2945d5d Merge pull request #135072 from Jefftree/graceful-queue
Gracefully shutdown typed queue
2025-11-05 08:07:05 -08:00
yliao
949be1d132 fixed comments due to switch from class name to class for GetDeviceClass 2025-11-05 15:08:38 +00:00
Kubernetes Prow Robot
07faa17f8f Merge pull request #135108 from scaliby/remove-deprecated-ic-api
Drop support for networkingv1beta1.IngressClass in kubectl
2025-11-05 05:52:52 -08:00
Arda Güçlü
9cad3f8787 Introduce kuberc view/set commands under kubectl alpha (#135003)
* Introduce kuberc view/set commands under kubectl alpha

* Apply requested changes

* Apply requested changes
2025-11-05 01:48:59 -08: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
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
Lalit Chauhan
0aea256ef9 revert of 8f0a6583ca 2025-11-05 00:13:26 +00: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
4b2e387b8b Merge pull request #134734 from kannon92/kal-linter-enable
Enable duplicatemarkers for Kubernetes API Linter
2025-11-04 15:32:14 -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
Kubernetes Prow Robot
97cb47a913 Merge pull request #135080 from dejanzele/feat/promote-job-managedby-to-ga
KEP-4368: Job Managed By; Promote to GA
2025-11-04 13:42:12 -08:00
Monis Khan
2a3f66d3f6 KEP-5284: Implement Constrained Impersonation
Signed-off-by: Jian Qiu <jqiu@redhat.com>
Signed-off-by: Monis Khan <mok@microsoft.com>

Co-authored-by: Jian Qiu <jqiu@redhat.com>
Co-authored-by: Monis Khan <mok@microsoft.com>
2025-11-04 16:30:49 -05:00
Patrick Ohly
bbf8bc766e DRA device taints: DeviceTaintRule status
To update the right statuses, the controller must collect more information
about why a pod is being evicted. Updating the DeviceTaintRule statuses then is
handled by the same work queue as evicting pods.

Both operations already share the same client instance and thus QPS+server-side
throttling, so they might as well share the same work queue. Deleting pods is
not necessarily more important than informing users or vice-versa, so there is
no strong argument for having different queues.

While at it, switching the unit tests to usage of the same mock work queue as
in staging/src/k8s.io/dynamic-resource-allocation/internal/workqueue. Because
there is no time to add it properly to a staging repo, the implementation gets
copied.
2025-11-04 21:57:24 +01:00
Patrick Ohly
0689b628c7 generated files 2025-11-04 21:57:24 +01:00
yongruilin
256591520a feat: add OWNERS files for flagz server and api with approvers and reviewers 2025-11-04 19:45:32 +00:00
yongruilin
2422bc0bb8 feat: Implement structured /flagz endpoint 2025-11-04 19:45:30 +00:00
Kubernetes Prow Robot
a058cf788a Merge pull request #134624 from yt2985/podcertificates-beta
Promote Pod Certificates feature to beta
2025-11-04 11:42:12 -08:00
Kubernetes Prow Robot
645073f978 Merge pull request #132240 from yue9944882/delta-fifo-batch
Adding batch handling for popping items from RealFIFO
2025-11-04 11:42:05 -08:00
yliao
b3222498fd added comments, and refactoring to make it explicit and easier to
understand.
2025-11-04 19:16:48 +00:00
Min Jin
611b4c1408 Adding batch handling for popping items from RealFIFO
Signed-off-by: Min Jin <minkimzz@amazon.com>

Update staging/src/k8s.io/client-go/tools/cache/the_real_fifo.go

optimizing fifo loop

Co-authored-by: Marek Siarkowicz <marek.siarkowicz@protonmail.com>
Signed-off-by: Min Jin <minkimzz@amazon.com>

refactoring PopBatch to accept []Delta

Signed-off-by: Min Jin <minkimzz@amazon.com>
2025-11-04 09:59:32 -08:00
yliao
c67937dd35 switched from storing name to storing a pointer to the device class. 2025-11-04 17:51:12 +00:00
fj-naji
c438f8a983 scheduler: Add BindingTimeout args to DynamicResources plugin
Add a new `bindingTimeout` field to DynamicResources plugin args and wire it
into PreBind.

Changes:
- API: add `bindingTimeout` to DynamicResourcesArgs (staging + internal types).
- Defaults: default to 600 seconds when BOTH DRADeviceBindingConditions and
  DRAResourceClaimDeviceStatus are enabled.
- Validation: require >= 1s; forbid when either feature gate is disabled.
- Plugin: plumbs args into `pl.bindingTimeout` and uses it in
  `wait.PollUntilContextTimeout` for binding-condition wait logic.
- Plugin: remove legacy `BindingTimeoutDefaultSeconds`.

Tests:
- Add/adjust unit tests for validation and PreBind timeout path.
- Ensure <1s and negative values are rejected; forbids when gates disabled.
2025-11-04 17:15:19 +00:00
Konrad Kaim
a9ff1b19c1 remove deprecated IngressClass api from describe 2025-11-04 16:53:26 +00:00
Kubernetes Prow Robot
af70ebcbf5 Merge pull request #132157 from haircommander/drop-userns-psa
drop UserNamespacesPodSecurityStandards feature gate
2025-11-04 08:20:08 -08:00
Jefftree
f1bd4f509e refactor updateUnfinishedWork into separate function to use defer unlock 2025-11-04 15:27:53 +00:00
Kubernetes Prow Robot
ac46677d2a Merge pull request #134967 from ttsuuubasa/dra-bc-allocator-test
scheduler: KEP-5007 allocator test - devices w/wo BindingConditions
2025-11-04 07:14:17 -08:00
Arda Güçlü
9113013eb8 Introduce --as-user-extra persistent flag in kubectl (#134378)
* Introduce --as-user-extra as persistent flag

* Add integration test to verify the behavior

* Update flag type to string slice
2025-11-04 07:14:09 -08:00
Jordan Liggitt
0639f7f40e Allow PSA controller tests to handle failure cases as errors 2025-11-04 09:16:39 -05:00
Dejan Zele Pejchev
3dabd4417d KEP-4368: Job Managed By; Promote to GA
Signed-off-by: Dejan Zele Pejchev <pejcev.dejan@gmail.com>
2025-11-04 10:59:45 +01:00
Kubernetes Prow Robot
3717c7025e Merge pull request #134793 from LionelJouin/issue-134789
DRA allocator: Add the requests corresponding to the config FromClass
2025-11-03 13:24:04 -08:00
Jefftree
bdb2e37781 Fix queue to gracefully shutdown 2025-11-03 20:03:49 +00:00
yliao
b83a6a83f0 pick the device class created latest, or with name alphabetically sorted earlier 2025-11-03 19:28:18 +00:00
Kubernetes Prow Robot
462c869354 Merge pull request #134326 from sairameshv/global_cache_dra
Add global cache to map between the deviceclass and the extended resource
2025-11-03 10:40:06 -08:00
Kubernetes Prow Robot
da2eea1bf2 Merge pull request #134263 from ardaguclu/autoscale-dryrun-client
Add given namespace in dryrun=client output of HPA
2025-11-03 09:34:05 -08:00
Kubernetes Prow Robot
67c3cb2228 Merge pull request #135056 from pohly/dra-pool-less-checking
DRA: fix "all" allocation with incomplete pools differently
2025-11-03 08:34:22 -08:00
Kubernetes Prow Robot
3f1255dd5f Merge pull request #134913 from scaliby/remove-deprecated-es-api
Drop support for discoveryv1beta1.EndpointSlice in kubectl
2025-11-03 08:34:06 -08:00