Commit Graph

3604 Commits

Author SHA1 Message Date
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
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
yongruilin
96349a4608 chore: Move declarative validation featuregates to staging apiserver 2025-09-26 22:30:16 +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
Joe Betz
7efc77f493 Apply feedback 2025-09-25 14:51:52 -04:00
yongruilin
71797498f9 test(certificates): Add ratcheting test for CSR conditions 2025-09-25 17:37:16 +00:00
Joe Betz
7019a088c3 Add declarative validation tests for ResourceClaim status 2025-09-24 10:00:17 -04:00
Joe Betz
8606fa03dc Add declarative validation of ResourceClaim status pool field 2025-09-24 10:00:17 -04:00
Kubernetes Prow Robot
725c9153df Merge pull request #134078 from aaron-prindle/vg-enable-deviceclass
feat(validation-gen) enable declarative validation for resource.k8s.io DeviceClass
2025-09-18 15:24:12 -07:00
Aaron Prindle
17665a39cf feat(validation-gen) enable declarative validation for resource.k8s.io DeviceClass 2025-09-17 17:21:19 +00:00
yongruilin
eca1cfb259 chore(validation): add validation identifier for declarative validation in ResourceClaim 2025-09-16 21:36:18 +00:00
yongruilin
c0fcb10acf fix(tests): update fake client initialization and add resource version handling in validation tests 2025-09-16 21:36:18 +00:00
yongruilin
7c45b1aa3b refactor: simplify declarative validation tests for ResourceClaim 2025-09-16 21:36:18 +00:00
yongruilin
380c4c222e feat(validation-gen): Add declarative validation support for ResourceClaim/(v1,v1beta1,v1beta2) 2025-09-16 21:36:18 +00:00
Lalit Chauhan
92dcd02459 Add helpers for declarative validation tests
Introduces new testing helpers to simplify testing of declarative validation rules. The new `VerifyValidationEquivalence` and `VerifyUpdateValidationEquivalence` functions reduce boilerplate by encapsulating the logic for:

- Toggling the `DeclarativeValidation` and `DeclarativeValidationTakeover` feature gates.
- Comparing the validation output from the imperative and declarative paths.

The declarative validation tests for CertificateSigningRequest and ReplicationController are updated to use these new, simpler helpers.
2025-09-16 16:57:21 +00:00
Kubernetes Prow Robot
09278c1292 Merge pull request #133946 from lalitc375/k8s-dv-metrics
Add fine grained metrics to narrow down DV mismatches and panics
2025-09-15 19:44:09 -07:00
Lalit Chauhan
1a5e77135b Add fine grained metrics to narrow down DV mismatches and panics 2025-09-16 00:36:14 +00:00
Kubernetes Prow Robot
d2c8e50db3 Merge pull request #133871 from serathius/storage-resource-prefix2
Ensure that storage only accesses keys from under resourcePrefix
2025-09-11 00:08:07 -07:00
Kubernetes Prow Robot
2854e946c3 Merge pull request #131430 from carlory/follow-up-127017
remove v1beta3 flowcontrol from rest storage
2025-09-10 11:48:05 -07:00
Marek Siarkowicz
1ac067ae0e Fix tests to to only accesses keys from under resourcePrefix 2025-09-10 14:49:58 +02:00
Kubernetes Prow Robot
ef4add4509 Merge pull request #133356 from mayuka-c/issue-133175
Replace usage of deprecated ErrWaitTimeout with recommended method across all Pkgs
2025-09-05 06:43:34 -07:00
Keisuke Ishigami
ddb015f023 Resolve confusing use of TooManyRequests error for eviction (#133097)
modify test "the error includes the reason when the condition.Status is False"
2025-09-04 12:19:14 -07:00
Marek Siarkowicz
683a76dd15 Enforce that all resources set resourcePrefix 2025-09-04 00:11:15 +02:00
Kubernetes Prow Robot
a6693542b7 Merge pull request #133781 from pohly/test-apiserver-flag-registration
test/integration/apiserver: fix several data races
2025-09-02 13:09:17 -07:00
Patrick Ohly
e32adad657 apiserver: fix PriorityClasses creation data race
As mentioned for SystemPriorityClasses:

     NOTE: be careful not to modify any of elements of the returned array directly.

Create violates that because it temporarily changes the kind during encoding.
This led to a data race in test/integration/apiserver/oidc, found during local
testing.

Co-authored-by: Jordan Liggitt <liggitt@google.com>
2025-09-02 21:00:18 +02:00
carlory
faa0f33b8b remove v1beta3 flowcontrol from rest storage
Signed-off-by: carlory <baofa.fan@daocloud.io>
2025-08-29 16:32:08 +08:00
Kubernetes Prow Robot
6b33567f9b Merge pull request #133684 from soltysh/drop_StatefulSetAutoDeletePVC
Drop StatefulSetAutoDeletePVC after the feature GA-ed in 1.32
2025-08-28 10:49:15 -07:00
Maciej Szulik
09e357d31f Drop StatefulSetAutoDeletePVC after the feature GA-ed in 1.32
Signed-off-by: Maciej Szulik <soltysh@gmail.com>
2025-08-28 13:35:16 +02:00
Kubernetes Prow Robot
0a48870050 Merge pull request #133681 from soltysh/ordinals_cleanup
Drop unused tests, after KEP-3335 graduated to GA
2025-08-27 20:24:21 -07:00
Kubernetes Prow Robot
b54c00b2ad Merge pull request #132550 from gavinkflam/130656-fix-duplicate-validations-4
bug: Remove duplicate RBAC resources update validations
2025-08-27 14:54:20 -07:00
Kubernetes Prow Robot
4d15270bd7 Merge pull request #132549 from gavinkflam/130656-fix-duplicate-validations-3
bug: Remove duplicate storage resources update validations
2025-08-27 14:54:12 -07:00
Maciej Szulik
09954ce369 Drop unused tests, after KEP-2599 graduated to GA
Signed-off-by: Maciej Szulik <soltysh@gmail.com>
2025-08-25 12:03:21 +02:00
Maciej Szulik
f2bc8bdea5 Drop unused tests, after KEP-3335 graduated to GA
Signed-off-by: Maciej Szulik <soltysh@gmail.com>
2025-08-25 11:40:59 +02:00
Mayuka Channankaiah
6c56d2fd1b Replace usage of deprecated ErrWaitTimeout with recommended method across all Pkgs 2025-08-01 14:18:06 +05:30
Sunyanan Choochotkaew
5ad969588d KEP-5075: API updates
Signed-off-by: Sunyanan Choochotkaew <sunyanan.choochotkaew1@ibm.com>
2025-07-30 09:26:40 +09:00
yliao
34a64db2c7 extended resource backed by DRA: implementation 2025-07-29 18:55:21 +00:00
Kubernetes Prow Robot
fd3c879a5b Merge pull request #132443 from utam0k/clearn-nnn-bind-api
Clear pod.Status.NominatedNodeName when pod is bound
2025-07-29 10:12:26 -07:00
utam0k
60fa65db88 Clear pod.Status.NominatedNodeName when pod is bound
Signed-off-by: utam0k <k0ma@utam0k.jp>
2025-07-29 23:48:11 +09:00
Kobayashi,Daisuke
987ad39516 KEP-5007 DRA Device Binding Conditions: API Related code Update 2025-07-29 11:32:47 +00:00
Kubernetes Prow Robot
7912e5fd67 Merge pull request #131549 from carlory/KEP-3751-GA
[Kep-3751] Promote VolumeAttributesClass to GA
2025-07-24 16:44:27 -07:00
carlory
94bf8fc8a9 Promoted API VolumeAttributesClass and VolumeAttributesClassList to storage.k8s.io/v1.
Promoted feature-gate `VolumeAttributesClass` to GA (on by default)

Signed-off-by: carlory <baofa.fan@daocloud.io>
2025-07-25 01:53:59 +08:00
Patrick Ohly
5c4f81743c DRA: use v1 API
As before when adding v1beta2, DRA drivers built using the
k8s.io/dynamic-resource-allocation helper packages remain compatible with all
Kubernetes release >= 1.32. The helper code picks whatever API version is
enabled from v1beta1/v1beta2/v1.

However, the control plane now depends on v1, so a cluster configuration where
only v1beta1 or v1beta2 are enabled without the v1 won't work.
2025-07-24 08:33:45 +02:00
Patrick Ohly
cff91579e8 DRA API: v1 registration + tests 2025-07-24 08:30:25 +02:00
Kubernetes Prow Robot
3e3f43f4b8 Merge pull request #132537 from lalitc375/hpa-validation
add validation logic for APIVersion fields of HPA
2025-07-22 19:04:27 -07:00
Lalit Chauhan
f6aee63690 add validation logic for APIVersion fields of HPA
New validation logic follows the API ratcheting principle,  will not be executed for already stored invalid if the corresponding fields or item in array is not modified. Please enter the commit message for your changes. Lines starting
2025-07-22 20:40:48 +00:00
Kubernetes Prow Robot
cc674e7470 Merge pull request #128010 from ahmedtd/pod-certificates-types
Pod Certificates: Preliminary implementation of KEP-4317
2025-07-21 19:26:30 -07:00
Taahir Ahmed
4624cb9bb9 Pod Certificates: Basic implementation
* Define feature gate
* Define and serve PodCertificateRequest
* Implement Kubelet projected volume source
* kube-controller-manager GCs PodCertificateRequests
* Add agnhost subcommand that implements a toy signer for testing

Change-Id: Id7ed030d449806410a4fa28aab0f2ce4e01d3b10
2025-07-21 21:49:57 +00:00
Aaron Prindle
18918e2008 add CSR declarative_validation_test.go tests 2025-07-21 19:27:59 +00:00
Kubernetes Prow Robot
e84a6cb7ef Merge pull request #133068 from yongruilin/master_vg-csr-subresource
feat: Enabledeclarative validation in CertificateSigningRequest subresources updates
2025-07-21 11:58:33 -07:00