Commit Graph

4700 Commits

Author SHA1 Message Date
Kubernetes Prow Robot
de07331f0f Merge pull request #134358 from lalitc375/extended-resource-name
feat: Add k8s-extended-resource-name format and validator for DeviceClass
2025-10-21 13:16:38 -07:00
Lalit Chauhan
229b33c440 Address feedbacks 2025-10-21 18:09:10 +00: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
Lubomir I. Ivanov
3968f7ec5d apis/apps/fuzzer: add missing MaxUnavailable defaulting
Include defaulting in the StatefulSet fuzzer for the field
RollingUpdate.MaxUnavailable, otherwise when the feature gate
MaxUnavailableStatefulSet is enabled it changes the default
in SetDefaults_StatefulSet from /pkg/apis/apps/v1/defaults.go.

That can cause errors such as:
  --- FAIL: TestRoundTripTypes (1.05s)

...

  - MaxUnavailable: nil,
  + MaxUnavailable: s"1",
2025-10-21 19:03:57 +02:00
yongruilin
a817e2b923 test(validation): Mark bindingConditions and bindingFailureConditions errors as covered by declarative 2025-10-20 23:38:48 +00:00
yongruilin
2a116e29ce feat(dra): Add maxItems tag on DeviceRequestAllocationResul.BindingFailureConditions field 2025-10-20 23:35:09 +00:00
yongruilin
ab08274be1 feat(dra): Add maxItems tag on DeviceRequestAllocationResul.BindingConditions field 2025-10-20 23:34:00 +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
Aaron Prindle
2fd727bf92 address feedback - comment on declarative defaulting gap w/ DV 2025-10-16 22:47:22 +00:00
Kubernetes Prow Robot
7af016ec31 Merge pull request #133153 from helayoty/helayoty/enable-beta-maxUnavailable
Update MaxUnavailableStatefulSet feature gate to beta
2025-10-16 12:04:50 -07:00
Kubernetes Prow Robot
50e3cb3f58 Merge pull request #133128 from jm-franc/set-gate-to-beta
Promote HPAConfigurableTolerance gate to beta
2025-10-16 12:04: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
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
f7fb7cd86b Merge pull request #134588 from liggitt/fixes-only-no-go-bump
go 1.25.2/1.24.8 related fixes
2025-10-14 07:45:36 -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
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
b3eb152db4 feat(dra): Migrate DeviceAllocationResult.Config maxItems validation to declarative
This commit migrates the validation for the DeviceAllocationResult.Config field to declarative validation by adding the +k8s:maxItems=64 annotation.

The change is applied to the following API versions:
- resource/v1
- resource/v1beta1
- resource/v1beta2
2025-10-13 22:18:10 +00:00
yongruilin
a05fce7c22 feat(dra): Add maxItems tag on AllocationResult.Results
This commit migrates the validation for the AllocationResult.Results field to declarative validation by adding the +k8s:maxItems=32 tag.

This aligns with the existing AllocationResultsMaxSize constant and ensures consistency with similar fields like ReservedFor.

This change is applied to the following API versions:
- resource/v1
- resource/v1beta1
- resource/v1beta2
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
Jordan Liggitt
39d37a1e92 Remove invalid SAN certificate construction 2025-10-13 10:27:22 -07:00
yongruilin
b0a511d309 feat(dra): Add maxItems tag on ReservedFor field
This commit migrates the validation for the ReservedFor field to declarative validation by adding the +k8s:maxItems=256 tag.

This change is applied to the following versions:
- resource/v1
- resource/v1beta1
- resource/v1beta2
2025-10-13 06:58:46 +00:00
Kubernetes Prow Robot
b30d138603 Merge pull request #134465 from lalitc375/k8s-label-key
Add k8s-label-key format for toleration key
2025-10-10 13:57:00 -07:00
Lalit Chauhan
8b5cf608fd Add k8s-label-key format for toleration key 2025-10-10 16:25:48 +00:00
PersistentJZH
b738e8c3ca fix panic in cron.ParseStandard
Signed-off-by: PersistentJZH <zhihao.kan17@gmail.com>

fix

optimize logic

fix unit test
2025-10-10 23:51:05 +08:00
yongruilin
9c2520b633 test: mark duplicate device requests as covered by declarative validation 2025-10-09 18:54:53 +00:00
yongruilin
ed932547cf feat: migrate DeviceClaimConfiguration.Requests to declarative validation 2025-10-09 07:52:36 +00:00
yongruilin
63f8c0a4fe feat: migrate DeviceConstraint.Requests uniqueness to declarative validation 2025-10-09 07:11:27 +00:00
yongruilin
3ad7b189b7 feat: migrate DeviceRequest.FirstAvailable uniqueness to declarative validation 2025-10-09 05:58:21 +00:00
yongruilin
ca9e09b7d3 feat: migrate DeviceClaim.Requests uniqueness to declarative validation
This change migrates the validation for unique device request names
for the DeviceClaim.Requests field to a declarative format.

The `+k8s:unique=map` and `+k8s:listMapKey=name` tags have been added
to the `Requests` field within the `DeviceClaim` API type. This ensures
the generated validation code enforces that all entries in the `requests`
slice have a unique `name`.
2025-10-09 05:55:49 +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
b4fa5794ef generate 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
Aaron Prindle
dfd7b230b4 feat: make it so that all ShortCircuit validators are run for short circuiting check 2025-10-07 22:47:42 +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
Kubernetes Prow Robot
251b3ad820 Merge pull request #134284 from aaron-prindle/fix-resourceclaim-oneof-logic
fix: update pkg/apis/resource validateDeviceRequest to short-circuit on the oneOf check
2025-10-07 13:35:01 -07:00
Lalit Chauhan
1fb8674387 Add listType=map and listMapekey=uid for ResourceClaimStatus.ReservedFor 2025-10-07 20:07:48 +00:00
Kubernetes Prow Robot
3a53784ecb Merge pull request #133876 from kei01234kei/make_v1_version_fist_priotiry_inresource
make v1 resource version first priority in resource
2025-10-07 08:55:02 -07:00
Kubernetes Prow Robot
ad82c3d39f Merge pull request #134391 from lalitc375/k8s-uuid
Add DV for uids in resourceClaim Status
2025-10-06 15:42:59 -07:00
Aaron Prindle
111fc04e1d fix: update pkg/apis/resource validateDeviceRequest to short-circuit on the oneOf check 2025-10-06 22:15:53 +00:00
Aaron Prindle
e62523e1f5 address feedback 2025-10-06 22:10:33 +00:00