Commit Graph

3674 Commits

Author SHA1 Message Date
Lalit Chauhan
95c42b9951 Fix rebase issues 2025-10-21 18:09:10 +00:00
Lalit Chauhan
cf96486aed Add format validator for DeviceClass.ExtendedResourceName 2025-10-21 18:09:10 +00:00
Kubernetes Prow Robot
3eeb838aba Merge pull request #132927 from pohly/dra-api-strategy-todo
DRA API: implement ResourceClaim strategy for DRADeviceTaints
2025-10-21 05:54:41 -07:00
Patrick Ohly
da80b554a7 DRA API: unify dropped field logic for ResourceClaim and ResourceClaimTemplate
The spec is the same in both, so those fields are now handled by common
code. For ResourceClaim spec updates, the "in use" check now only considers
the spec.

Theoretically some features could be in use in an old ResourceClaim status
and not in use in the spec. This can only occur in a spec update, which is
currently prevented because the entire spec is immutable. Even if it was
allowed, preventing adding disabled fields to the spec is the right thing to
do regardless of what may have ended up in the status earlier.
2025-10-21 12:22:52 +02:00
yongruilin
ce93309f4c test(validation): Add tests for bindingFailureConditions maxItems validation 2025-10-20 23:35:09 +00:00
yongruilin
2ad5127a79 test(validation): Add tests for bindingConditions maxItems validation 2025-10-20 23:35:06 +00:00
Aaron Prindle
47e9686b4d feat(validation-gen): add +k8s:format=k8s-long-name-caseless declarative validation for DeviceRequestAllocationResult.Driver 2025-10-19 23:55:16 +00:00
Lalit Chauhan
2072acb3ba Add listType=map and listMapekeys on ResourceClaimStatus.Devices 2025-10-17 22:48:52 +00:00
Kubernetes Prow Robot
2158dd67e9 Merge pull request #134630 from lalitc375/k8s-enum
feat: add enum validation for AllocationConfigSource
2025-10-17 15:40:51 -07:00
Lalit Chauhan
1f803aa314 Use DV for long name validation of spec.devices.requests[%d].firstAvailable[%d].deviceClassName 2025-10-17 19:15:34 +00:00
Kubernetes Prow Robot
4bb072512e Merge pull request #134446 from aaron-prindle/dv-device-allocation-mode-enum-migration
feat: add +k8s:enum declarative validation to ResourceClaim DeviceAllocationMode
2025-10-17 11:54:41 -07:00
Kubernetes Prow Robot
e066b3850f Merge pull request #133912 from tallclair/kube-feature-deps
Mark all Kube feature dependencies, and require dependencies to be declared for all features
2025-10-16 11:14:43 -07:00
Aaron Prindle
9d83f71cde fix validation_test.go to use path normalization 2025-10-16 17:40:19 +00:00
Aaron Prindle
a77f845141 address feedback - remove origin for enum as NotSupported handles this 2025-10-16 17:40:19 +00:00
Aaron Prindle
6e95412c43 address nit 2025-10-16 17:40:19 +00:00
Aaron Prindle
77d87a0e63 fix normalization rule post-rebase 2025-10-16 17:40:19 +00:00
Aaron Prindle
f84423813b address feedback 2025-10-16 17:40:19 +00:00
Aaron Prindle
9a7dace734 feat: add +k8s:enum declarative validation to ResourceClaim DeviceAllocationMode 2025-10-16 17:40:18 +00:00
Lalit Chauhan
9020a17731 feat: add enum validation for AllocationConfigSource
This commit introduces enum-based validation for the `AllocationConfigSource` field.

The following changes are included:
- The `AllocationConfigSource` type is now marked with `+k8s:enum`.
- The `Source` field in `DeviceAllocationConfiguration` is marked as required.
- Generated validation files are updated to enforce the enum constraint.
- A declarative validation test is added for the `AllocationConfigSource` field.
2025-10-16 04:28:14 +00:00
Tim Allclair
debe026b21 Fix unit tests to work with explicit depndencies 2025-10-15 15:04:26 -07:00
Kubernetes Prow Robot
6298c4e6ab Merge pull request #134626 from lalitc375/status
Test DV status update tests for all API versions
2025-10-15 14:41:36 -07:00
Lalit Chauhan
54f39033f0 Test status update for all APII versions 2025-10-15 18:11:48 +00:00
Jordan Liggitt
20af32e5c1 Stop serving alphas removed in 1.35 2025-10-15 12:59:59 -04:00
Patrick Ohly
ac5046786e DRA API: implement ResourceClaim and ResourceClaimTemplate strategy for DRADeviceTaints
This wasn't possible at the time of implementing the Device Taints API, at
least not completely, because it depended on prioritized list being merged
first, to cover the "FirstAvailable" field introduced together with that
feature.

That the device taints PR got merged despite this gap was an oversight. The
confusing TODO probably didn't help: the entire implementation was missing (or
got lost due to a bad merge conflict resolution, not sure anymore) and it
referenced the wrong other feature (partitionable devices doesn't affect
ResourceClaim).

For some reason, ResourceClaimTemplate update testing was less complete than
the update testing of ResourceClaim. Fixed by copying the entire
TestStrategyUpdate over and switching it to testing ResourceClaimTemplates.
2025-10-15 15:44:55 +02:00
Kubernetes Prow Robot
9b9cd768a0 Merge pull request #134516 from ramzeng/hotfix/ipallocator
fix: Add CIDR filtering and overflow protection to IP allocator
2025-10-13 21:47:34 -07:00
Kubernetes Prow Robot
5277a104e6 Merge pull request #134496 from yongruilin/master_vg-rc-unique
feat(DRA): migrate list uniqueness to declarative validation
2025-10-13 20:37:33 -07:00
曾是然
0554102ab3 test: Add CIDR allocator metrics test with multiple CIDRs 2025-10-14 01:59:34 +00:00
Kubernetes Prow Robot
7d87691fe3 Merge pull request #134558 from yongruilin/master_vg-rcstatus-maxitem
feat(validation): add k8s:update & migrate ResourceClaimStatus maxItem validation to declarative
2025-10-13 16:29:33 -07:00
yongruilin
9292f1e82b refactor(resourceclaim): generalize tweakDuplicateRequestName to tweakAddDeviceRequest 2025-10-13 22:37:11 +00:00
yongruilin
2260c9b983 test(validation): Add unit tests for DeviceAllocationResult.Config maxItems 2025-10-13 22:18:11 +00:00
yongruilin
8c7a338afe test(validation): Add tests for status.allocation.devices.results maxItems validation 2025-10-13 22:18:10 +00:00
Aaron Prindle
f70142a6a9 feat(validation-gen): migrate ResourceClaimStatus.Allocation NoModify validation to declarative validation
Co-Authored-by: Yongrui Lin <yongrlin@outlook.com>
2025-10-13 22:18:10 +00:00
Kubernetes Prow Robot
db63a581ca Merge pull request #134366 from tallclair/feature-gates-test
Set multiple feature gates simultaneously in test
2025-10-13 13:11:33 -07:00
yongruilin
4d61ba787d test(validation): Add tests for status.ReservedFor maxItems validation 2025-10-13 06:58:47 +00:00
曾是然
83eebc2290 fix: Add CIDR filtering and overflow protection to IP allocator 2025-10-11 15:29:25 +00:00
曾是然
20dafe678b test: Add failing tests for IP allocator CIDR filtering and overflow protection 2025-10-11 01:45:04 +00:00
Lalit Chauhan
8b5cf608fd Add k8s-label-key format for toleration key 2025-10-10 16:25:48 +00:00
yongruilin
514b93d7e1 test: add validation test for duplicate DeviceClaimConfiguration requests 2025-10-09 07:52:38 +00:00
yongruilin
c81fc12900 test: add validation test for duplicate DeviceConstraint.Requests 2025-10-09 07:12:15 +00:00
yongruilin
2341b3bcc8 test: add validation test for duplicate FirstAvailable names 2025-10-09 05:58:22 +00:00
yongruilin
d045a9dd3c test: add validation test for duplicate device request names 2025-10-09 05:55:50 +00:00
Kubernetes Prow Robot
28c655e79b Merge pull request #134286 from aaron-prindle/dv-format-long-name-caseless-tag-migration
feat: migrate k8s:format=k8s-long-name-caseless validation on OpaqueDeviceConfiguration.Driver to declarative validation
2025-10-08 19:16:59 -07:00
Kubernetes Prow Robot
3e4b5e48f2 Merge pull request #134193 from hoskeri/fix-ipv6allocator
Fix IPv6 allocator for /64 CIDRs
2025-10-08 18:03:01 -07:00
Aaron Prindle
8e4cd1f3b6 address feedback 2025-10-08 20:45:07 +00:00
Aaron Prindle
d77cb206a0 feat: migrate k8s:format=k8s-long-name-caseless validation on OpaqueDeviceConfiguration.Driver to declarative validation 2025-10-08 20:45:01 +00:00
Aaron Prindle
2fa703bfb6 address feedback 2025-10-07 22:49:14 +00:00
Aaron Prindle
1c0f0add8a feat: add +k8s:immutable tag to ResourceClaim.spec and associated tests 2025-10-07 22:49:11 +00:00
Kubernetes Prow Robot
73bcd2b0e4 Merge pull request #134333 from lalitc375/reserved-for
Add listType=map and listMapekey=uid for ResourceClaimStatus.ReservedFor
2025-10-07 15:44:59 -07:00
Kubernetes Prow Robot
62e9524c85 Merge pull request #134412 from aaron-prindle/resourceclaim-strategy-cleanup
fix: remove unnecessary ValidateResourceClaim call from resourclaim ValidateUpdate
2025-10-07 14:24:59 -07:00
Lalit Chauhan
1fb8674387 Add listType=map and listMapekey=uid for ResourceClaimStatus.ReservedFor 2025-10-07 20:07:48 +00:00