Lalit Chauhan
2d233b6c31
Add a test case for invalid map to invalid map
2026-01-07 18:13:46 +00:00
Lalit Chauhan
13c801305a
Migrate ResourceSlice map key validation to declarative validation
...
This commit migrates the validation of map keys for CounterSet.Counters and
DeviceCounterConsumption.Counters in the ResourceSlice API from handwritten
validation to declarative validation using +k8s:eachKey=+k8s:format=k8s-short-name.
This simplifies the handwritten validation logic and leverages the shared
declarative validation machinery.
2026-01-07 17:53:45 +00:00
Lalit Chauhan
630a2a7c35
Add origins for the union validtions errors
2025-12-18 19:07:47 +00:00
Morten Torkildsen
93fc7422ee
DRA: Update validation for Partitionable Devices
2025-11-06 21:13:33 +00:00
Kubernetes Prow Robot
41fd1b51f6
Merge pull request #134520 from sunya-ch/add-share-id-to-plugin-device
...
[DRA] Add ShareID to kubelet plugin API
2025-11-06 12:43:00 -08:00
Sunyanan Choochotkaew
801de96635
DRA: ConsumableCapacity update allocating and registry test cases
...
Signed-off-by: Sunyanan Choochotkaew <sunyanan.choochotkaew1@ibm.com >
2025-11-06 09:19:19 +09:00
Sunyanan Choochotkaew
eea7c1403f
[DRA] Add ShareID to kubelet plugin API
...
Signed-off-by: Sunyanan Choochotkaew <sunyanan.choochotkaew1@ibm.com >
2025-11-06 03:28:35 +09:00
Kubernetes Prow Robot
c329e64929
Merge pull request #134962 from sunya-ch/fix-resourceclaim-strategy-test-err
...
[DRA] Fix unexpected errors on ResourceClaim strategy update
2025-11-05 00:44:59 -08:00
Lalit Chauhan
0aea256ef9
revert of 8f0a6583ca
2025-11-05 00:13:26 +00:00
Sunyanan Choochotkaew
4acafd9245
[DRA] Fix unexpected errors on ResourceClaim strategy update
...
- Fix setting distinctAttribute=nil when DRAConsumableCapacity is disabled
- Add must have no error check when no error expected in strategy test
- Update test case that causes unexpected errors
Signed-off-by: Sunyanan Choochotkaew <sunyanan.choochotkaew1@ibm.com >
2025-11-05 08:45:51 +09: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
22151d719b
Merge pull request #135079 from aaron-prindle/dra-shortcircuit-maxitems
...
feat: update DRA to short-circuit on maxSize checks, add a declarative validation test related to this case
2025-11-04 12:52:18 -08:00
Aaron Prindle
a22b3d031f
address feedback
2025-11-03 21:30:17 +00:00
Aaron Prindle
39ad8278e2
feat: update DRA to short-circuit on maxSize checks, add a declarative validation test related to this case
2025-11-03 21:16:45 +00:00
Kubernetes Prow Robot
b5c62b1b10
Merge pull request #134964 from sunya-ch/add-drop-devicebinding-fields
...
[DRA] Add dropDeviceBindingConditionsFields and fix immutable field on DeviceBindingConditions strategy test
2025-11-03 07:44:23 -08:00
Patrick Ohly
fee14ffca2
DRA API: device taints 1.35
...
This raises the number of allowed taints per device to 16 by lowering
the number of allowed devices to 64 per ResourceSlice if (and only if!)
taints are used.
"effect: None" and DeviceTaintRule status with conditions get added
to support giving feedback to admins.
Instead of merely adding the new effect value, this also changes validation of
the enum so that unknown values are valid if they were already stored. This
will simplify adding new effects in the future because validation won't fail
for them after a downgrade. Consumers must treat them like this new None
effect, i.e. ignore them.
2025-10-31 18:11:18 +01:00
Sunyanan Choochotkaew
b1942ae6b1
[DRA] Add dropDeviceBindingConditionsFields and fix immutable field on DeviceBindingConditions strategy test
...
Signed-off-by: Sunyanan Choochotkaew <sunyanan.choochotkaew1@ibm.com >
2025-10-30 17:04:43 +09:00
yongruilin
df3f5dd493
test(validation): add cases for validating maxItems in status.devices.networkData.ips
2025-10-30 07:14:06 +00:00
yongruilin
a8c9bb1f16
test(validation): add cases for validating maxItems in status allocation requests
2025-10-30 07:14:06 +00:00
yongruilin
9161461317
test(resourceclaim): add unit test for unique DeviceAllocationConfiguration.Requests in status
...
Add a unit test to to verify the uniqueness validation for . This ensures that duplicate request names within this field are correctly flagged as invalid.
2025-10-30 07:14:04 +00:00
yongruilin
cc0012b450
Add Declarative validation unit test for duplicate IPs in NetworkDeviceData
2025-10-30 07:06:35 +00:00
Lalit Chauhan
37ba7bb454
Address feedbacks
2025-10-29 04:41:10 +00:00
Lalit Chauhan
ec8c2246b2
Use k8s-resource-fully-qualified-name format to validate MatchAttribute
2025-10-29 04:41:07 +00:00
Lalit Chauhan
8f0a6583ca
Use eachKey DV in DRA resources.
2025-10-28 20:09:09 +00:00
Kubernetes Prow Robot
bdcff90855
Merge pull request #134805 from aaron-prindle/dv-deviceclaim-subfield
...
feat: add subfield +k8s:format=k8s-long-name validation for DeviceClass ObjeMeta.Name field
2025-10-28 12:10:03 -07:00
Aaron Prindle
9c32e488db
use tweak pattern
2025-10-28 17:38:32 +00:00
Kubernetes Prow Robot
ffdfc17ebc
Merge pull request #134824 from lalitc375/union
...
use union member DV in the DRA
2025-10-27 10:29:35 -07:00
Lalit Chauhan
8a6b3caaa0
use union member DV in the DRA
2025-10-24 23:04:48 +00:00
Kubernetes Prow Robot
8de3b303e0
Merge pull request #134807 from yongruilin/master_maxlength
...
Add k8s:maxLength tag and use it on NetworkDeviceData fields
2025-10-24 12:15:41 -07:00
Aaron Prindle
9ba536c2e4
feat: add subfield +k8s:format=k8s-long-name validation for DeviceClass ObjeMeta.Name field
2025-10-23 16:42:58 +00:00
Lalit Chauhan
2061ec2be9
Enable DV for resourceslice
2025-10-22 22:48:25 +00:00
yongruilin
f851bc7ce5
test(validation): add cases HardwareAddress length in ResourceClaim status
2025-10-22 22:42:32 +00:00
yongruilin
c3006a9bb9
test(validation): add cases for valid and invalid NetworkDeviceData.InterfaceName length
2025-10-22 22:42:30 +00:00
Kubernetes Prow Robot
6c8a609fd0
Merge pull request #134555 from aaron-prindle/dv-enum-migration
...
feat: add +k8s:enum declarative validation to ResourceClaim DeviceTolerationOperator and DeviceTaintEffect
2025-10-21 15:54:37 -07:00
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
Aaron Prindle
0cf9102763
feat: add +k8s:enum declarative validation to ResourceClaim DeviceTolerationOperator and DeviceTaintEffect
2025-10-19 22:36:15 +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