Commit Graph

53804 Commits

Author SHA1 Message Date
Kubernetes Prow Robot
16eebeb5ee Merge pull request #134379 from liggitt/gc-race
Lock all mutable fields when printing gc node
2025-10-02 11:40:56 -07:00
Kubernetes Prow Robot
f86edc2665 Merge pull request #133929 from huww98/fix-pv-cache-race-v2
scheduler/volumebinding: passive assume cache
2025-10-02 08:42:56 -07:00
Jordan Liggitt
6d3d7553fb Lock all mutable fields when printing gc node 2025-10-02 08:50:17 -04:00
Kubernetes Prow Robot
48390fb98e Merge pull request #134347 from yongruilin/master_vg-cleanup
feat(validation-gen): Add "cohorts" & Tighten and simplify test framework
2025-10-01 16:40:56 -07:00
Kubernetes Prow Robot
0f8107c736 Merge pull request #134211 from aaron-prindle/resourceclaim_maxitems
Add declarative validation +k8s:maxItems tag to ResourceClaim
2025-10-01 15:22:56 -07:00
yongruilin
51f02aa58a fix: Update error origin in ValidateDNS1123Label to use k8s-short-name format 2025-10-01 21:10:07 +00:00
yongruilin
6b11e6433c run update-codegen to for ReplicationController 2025-10-01 20:42:23 +00:00
Tim Hockin
0a26ff5cb4 Update CSR DV test to match RC style
Once we go broad, people will copy these.  Let's make them easy to debug
:)
2025-10-01 19:45:37 +00:00
Tim Hockin
2d48dae391 Eliminate public ValidateReplicationControllerName
Everyone who referenced it now uses the underlying function.  Clearer
and frees me up to change objectMeta validation without impacting anyone
else.
2025-10-01 19:45:37 +00:00
Tim Hockin
229c6b13ca Validate ReplicationController.metadata.name
This relies on `+k8s:subfield` and validation cohorts.  The
`k8s:optional` ensures that we don't run the name validation if name is
empty, because core apimachinery will already flag it as Required().

This demonstrates some of the DV value - docs and clients are now (in
theory) able to see what RC's name format is.

Co-Authored-by: Yongrui Lin <yongrlin@outlook.com>
2025-10-01 19:45:37 +00:00
Tim Hockin
5d067af5e1 Prefactor: Fix some bad tests 2025-10-01 19:00:30 +00:00
Tim Hockin
7b93851395 Fix ReplicationControl double validation 2025-10-01 18:37:13 +00:00
yongruilin
04d632dd05 fix: Adjust validation for pool names to ensure proper coverage in device requests 2025-10-01 18:35:23 +00:00
Kubernetes Prow Robot
ef95e1fd7e Merge pull request #134318 from xigang/disruption
disruption: remove unused pdb parameter from getExpectedScale method
2025-10-01 07:38:27 -07:00
Kubernetes Prow Robot
6bb0bd55a3 Merge pull request #134295 from omerap12/hpa-desiredReplicasCount-metric
Add desired_replicas gauge metric to HPA controller
2025-10-01 05:16:17 -07:00
Kubernetes Prow Robot
bded66365e Merge pull request #134258 from mayank-agrwl/apiserver-lease-gc
Make APIServerLeaseGC controller context-aware
2025-10-01 03:34:17 -07:00
Kubernetes Prow Robot
1a54b78999 Merge pull request #134259 from mayank-agrwl/legacy-token-tracking-controller
Make legacytokentracking controller context aware
2025-10-01 02:04:18 -07:00
Kubernetes Prow Robot
4a1558c545 Merge pull request #133967 from pohly/dra-allocator-selection
DRA: allocator selection
2025-09-30 08:24:18 -07:00
Patrick Ohly
60eeaa6ebd DRA scheduler: add unit test for allocator selection
This prevents the mistake from 1.34 where the default-on
DRAResourceClaimDeviceStatus feature caused the use of the experimental
allocator implementation. The test fails without a fix for that.
2025-09-30 16:53:38 +02:00
Patrick Ohly
7f57730ba4 DRA scheduler: fix selection of "incubating" allocator implementation
In 1.34, the default feature gate selection picked the "experimental" allocator
implementation when it should have used the "incubating" allocator. No harm
came from that because the experimental allocator has all the necessary if
checks to disable the extra code and no bugs were introduced when implementing
it, but it means that our safety net wasn't there when we expected it to be.

The reason is that the "DRAResourceClaimDeviceStatus" feature gate is on by
default and was only listed as supported by the experimental implementation.
This could be fixed by listing it as supported also by the other
implementation, but that would be a bit odd because there is nothing to support
for it (the reason why this was missed in 1.34!). Instead, the allocator
features are now only indirectly related to feature gates, with a single
boolean controlling the implementation of binding conditions.
2025-09-30 16:53:38 +02:00
Patrick Ohly
b5bcac998d DRA scheduler: clean up feature gate handling
Copying from feature.Features to new fields in the plugin got a bit silly with
the long list of features that we have now. Embedding feature.Features is
simpler.

Two fields in feature.Features weren't named according to the feature gate, now
they are named consistently and the fields are sorted.
2025-09-30 16:53:38 +02:00
Kubernetes Prow Robot
e5c04392c0 Merge pull request #134276 from aaron-prindle/allocation-mode-enum
fix: add +enum tag to resource DeviceAllocationMode
2025-09-30 07:14:34 -07:00
Kubernetes Prow Robot
14fb5e6481 Merge pull request #133697 from tallclair/feature-deps
Codify feature gate dependencies
2025-09-30 07:14:18 -07:00
Kubernetes Prow Robot
7353b6a93d Merge pull request #134312 from alaypatel07/gc-resourceclaim-extendedresource
fix resource claims deallocation for extended resource when pod is completed
2025-09-30 01:38:20 -07:00
Mayank Agrawal
b0460eedba Make legacytokentracking controller context aware 2025-09-29 21:41:47 -07:00
Kubernetes Prow Robot
7f180515d7 Merge pull request #134233 from aaron-prindle/dv-validate-csi-driver-option-support
refactor(DRA validation): Add granular controls to ValidateCSIDriverName for declarative validation migration
2025-09-29 12:20:20 -07:00
Alay Patel
8a03067211 fix resource claims deallocation for extended resource when pod is completed
Signed-off-by: Alay Patel <alayp@nvidia.com>
2025-09-29 15:15:40 -04:00
Aaron Prindle
2c12d5731e fix validation_resourceclaim_test.go with MarkCoveredByDeclarative 2025-09-29 18:53:33 +00:00
Aaron Prindle
9380248ad6 generate 2025-09-29 18:53:33 +00:00
Aaron Prindle
ef2b68388e add +k8s:maxItems tag logic and tests 2025-09-29 18:53:27 +00:00
Kubernetes Prow Robot
1ffdc16b71 Merge pull request #134314 from xigang/node_controller_zone
node_lifecycle_controller: fix ComputeZoneState method comment
2025-09-29 11:30:24 -07:00
Kubernetes Prow Robot
da552ef1d7 Merge pull request #134240 from yongruilin/master_vg_strategy-call
Refactor: Centralize declarative validation logic
2025-09-29 11:30:17 -07:00
Joe Betz
03a1a22478 Add declarative validation tests, use tweak pattern, and additional test structure changes 2025-09-29 16:03:53 +00:00
xigang
574ac5b497 disruption: remove unused pdb parameter from getExpectedScale method
Signed-off-by: xigang <wangxigang2014@gmail.com>
2025-09-28 17:41:36 +08:00
xigang
574b09b7de nodelifecycle: fix ComputeZoneState method comment
Signed-off-by: xigang <wangxigang2014@gmail.com>
2025-09-28 10:56:56 +08:00
Dan Bokete
b40b67b9cf Deprecate caseless driver name validation and enforce lowercase warnings
- Deprecate IsDNS1123SubdomainCaseless to avoid caseless validation issues.
- Warn when ResourceSlice driver names contain uppercase characters.
- Clarify driver names must be DNS subdomains and use only lowercase letters.
- Update tests, staging code, and OpenAPI spec to reflect the changes.
2025-09-27 13:23:59 +01:00
Omer Aplatony
7af3377900 Add desired_replicas histogram metric to HPA controller
Signed-off-by: Omer Aplatony <omerap12@gmail.com>
2025-09-27 09:30:03 +00:00
yongruilin
96349a4608 chore: Move declarative validation featuregates to staging apiserver 2025-09-26 22:30:16 +00:00
yongruilin
9a7e2291d1 refactor: Remove Validate(Update)Declaratively and improve error handling 2025-09-26 17:22:48 +00:00
Joe Betz
d2ec0308c7 simplify scale subresource testing and document expectations
Co-Authored-by: Yongrui Lin <yongrlin@outlook.com>
2025-09-26 17:22:48 +00:00
yongruilin
2d7dd9164f Refactor: Centralize declarative validation and migration logic
The boilerplate for running declarative validation was duplicated across multiple resource strategies. This included feature gate checks, metric identifier generation, error comparison, and conditional merging logic, which made the code verbose and difficult to maintain.

This commit introduces a new helper function, `rest.ValidateDeclarativelyWithMigrationChecks`, to encapsulate this common logic. All relevant strategies have been refactored to use this new function, resulting in cleaner and more concise code.
2025-09-26 17:22:46 +00:00
Kubernetes Prow Robot
0bdf1f89c3 Merge pull request #134279 from yongruilin/master_customunique
feat(validation-gen): Introduce k8s:customUnique to control listmap uniqueness
2025-09-26 10:10:16 -07:00
Kubernetes Prow Robot
4f72f0fdbf Merge pull request #134113 from jpbetz/resource-claim-status-pool
Enable Declarative Validation Pool status field of ResourceClaim
2025-09-26 09:16:18 -07:00
Kubernetes Prow Robot
aecc114b37 Merge pull request #134275 from humblec/fix
Fix error messages in volume path handler
2025-09-26 07:42:19 -07:00
Aaron Prindle
5119b86966 refactor(DRA validation): Add granular controls to ValidateCSIDriverName for declarative validation migration 2025-09-26 01:42:33 +00:00
Tim Allclair
2c78bc981c Introduce API to codify and validate feature gate dependencies 2025-09-25 16:45:43 -07:00
Joe Betz
7efc77f493 Apply feedback 2025-09-25 14:51:52 -04:00
yongruilin
7bab54a7c8 emit comment for uniqueness is disabled by k8s:customUnique 2025-09-25 17:37:17 +00:00
yongruilin
71797498f9 test(certificates): Add ratcheting test for CSR conditions 2025-09-25 17:37:16 +00:00
Lalit Chauhan
3015e58e40 Improve tests devex for DV tests. 2025-09-25 17:29:30 +00:00