Skip to content

Configure strategies to auto-wire declarative validation#138323

Open
jpbetz wants to merge 5 commits intokubernetes:masterfrom
jpbetz:wire-dv-everywhere
Open

Configure strategies to auto-wire declarative validation#138323
jpbetz wants to merge 5 commits intokubernetes:masterfrom
jpbetz:wire-dv-everywhere

Conversation

@jpbetz
Copy link
Copy Markdown
Contributor

@jpbetz jpbetz commented Apr 10, 2026

What type of PR is this?

/kind api-change

What this PR does / why we need it:

  • Strategies can now opt-in to declarative validation, eliminating the need to write special code in Validation and ValidationUpdate functions to enable DV.
  • Add a cross-cutting test to verify that all strategies in the kubernetes codebase opt-in to declarative validation.
  • Migrate all strategies so that the cross-cutting test passes.

Other notes:

  • This does not enable code generation for all APIs. DV will effectively be a no-op for APIs without validation codegen.
  • This is part of a larger set of changes to make it impossible to have DV tags in types.go files that are ignored by validation

Which issue(s) this PR is related to:

Special notes for your reviewer:

Does this PR introduce a user-facing change?

No. This change is a no-op from a user perspective.

NONE

@k8s-ci-robot k8s-ci-robot added size/XL Denotes a PR that changes 500-999 lines, ignoring generated files. kind/api-change Categorizes issue or PR as related to adding, removing, or otherwise changing an API do-not-merge/release-note-label-needed Indicates that a PR should not merge because it's missing one of the release note labels. labels Apr 10, 2026
@k8s-ci-robot
Copy link
Copy Markdown
Contributor

Please note that we're already in Code Freeze for the upcoming v1.36.0 release.

Adding the milestone to this PR is strictly prohibited without proper approval. If this PR needs to be included in the v1.36.0 release:

  1. Technical review: get the PR reviewed and approved as usual (/lgtm and /approve)
  2. Inclusion in release: ping @sig-release-leads on the #sig-release Slack channel and suggest to add the v1.36.0 milestone to the PR

We're also in Test Freeze for the release-1.36 branch. This means every merged PR will be automatically fast-forwarded via the periodic ci-fast-forward job to the release branch of the upcoming v1.36.0 release.

Fast forwards are scheduled to happen every 6 hours, whereas the most recent run was: Fri Apr 10 20:19:08 UTC 2026.

@k8s-ci-robot k8s-ci-robot added cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. do-not-merge/needs-sig Indicates an issue or PR lacks a `sig/foo` label and requires one. labels Apr 10, 2026
@k8s-ci-robot
Copy link
Copy Markdown
Contributor

This issue is currently awaiting triage.

If a SIG or subproject determines this is a relevant issue, they will accept it by applying the triage/accepted label and provide further guidance.

The triage/accepted label can be added by org members by writing /triage accepted in a comment.

Details

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository.

@k8s-ci-robot k8s-ci-robot added needs-triage Indicates an issue or PR lacks a `triage/foo` label and requires one. needs-priority Indicates a PR lacks a `priority/foo` label and requires one. labels Apr 10, 2026
@k8s-ci-robot k8s-ci-robot requested review from aojea and atiratree April 10, 2026 20:51
@k8s-ci-robot k8s-ci-robot added area/apiserver sig/api-machinery Categorizes an issue or PR as relevant to SIG API Machinery. sig/apps Categorizes an issue or PR as relevant to SIG Apps. sig/auth Categorizes an issue or PR as relevant to SIG Auth. labels Apr 10, 2026
@k8s-ci-robot k8s-ci-robot added sig/node Categorizes an issue or PR as relevant to SIG Node. and removed do-not-merge/needs-sig Indicates an issue or PR lacks a `sig/foo` label and requires one. labels Apr 10, 2026
@github-project-automation github-project-automation bot moved this to Needs Triage in SIG Apps Apr 10, 2026
@k8s-ci-robot k8s-ci-robot added sig/scheduling Categorizes an issue or PR as relevant to SIG Scheduling. sig/storage Categorizes an issue or PR as relevant to SIG Storage. labels Apr 10, 2026
@k8s-ci-robot
Copy link
Copy Markdown
Contributor

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: jpbetz
Once this PR has been reviewed and has the lgtm label, please assign deads2k for approval. For more information see the Code Review Process.

The full list of commands accepted by this bot can be found here.

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@k8s-ci-robot k8s-ci-robot added the wg/device-management Categorizes an issue or PR as relevant to WG Device Management. label Apr 10, 2026
@jpbetz
Copy link
Copy Markdown
Contributor Author

jpbetz commented Apr 10, 2026

/assign @lalitc375

cc @thockin @aaron-prindle @yongruilin

/sig api-machinery

@k8s-triage-robot
Copy link
Copy Markdown

This PR may require API review.

If so, when the changes are ready, complete the pre-review checklist and request an API review.

Status of requested reviews is tracked in the API Review project.

@k8s-ci-robot k8s-ci-robot added release-note-none Denotes a PR that doesn't merit a release note. and removed do-not-merge/release-note-label-needed Indicates that a PR should not merge because it's missing one of the release note labels. labels Apr 10, 2026
@jpbetz jpbetz changed the title Configure strategies to use declarative validation everywhere it is generated Configure strategies to auto-wire declarative validation Apr 10, 2026
@k8s-ci-robot k8s-ci-robot added size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files. and removed size/XL Denotes a PR that changes 500-999 lines, ignoring generated files. labels Apr 10, 2026
@k8s-ci-robot
Copy link
Copy Markdown
Contributor

@jpbetz: The following tests failed, say /retest to rerun all failed tests or /retest-required to rerun all mandatory failed tests:

Test name Commit Details Required Rerun command
pull-kubernetes-e2e-kind c7e3fb8 link true /test pull-kubernetes-e2e-kind
pull-kubernetes-e2e-gce c7e3fb8 link true /test pull-kubernetes-e2e-gce

Full PR test history. Your PR dashboard. Please help us cut down on flakes by linking to an open issue when you hit one in your PR.

Details

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. I understand the commands that are listed here.

@enj enj moved this to Needs Triage in SIG Auth Apr 11, 2026
@aramase aramase moved this from Needs Triage to !SIG Auth in SIG Auth Apr 13, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/apiserver cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. kind/api-change Categorizes issue or PR as related to adding, removing, or otherwise changing an API needs-priority Indicates a PR lacks a `priority/foo` label and requires one. needs-triage Indicates an issue or PR lacks a `triage/foo` label and requires one. release-note-none Denotes a PR that doesn't merit a release note. sig/api-machinery Categorizes an issue or PR as relevant to SIG API Machinery. sig/apps Categorizes an issue or PR as relevant to SIG Apps. sig/auth Categorizes an issue or PR as relevant to SIG Auth. sig/node Categorizes an issue or PR as relevant to SIG Node. sig/scheduling Categorizes an issue or PR as relevant to SIG Scheduling. sig/storage Categorizes an issue or PR as relevant to SIG Storage. size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files. wg/device-management Categorizes an issue or PR as relevant to WG Device Management.

Projects

Status: 🆕 New
Status: Needs Triage
Status: !SIG Auth
Status: Needs Triage

Development

Successfully merging this pull request may close these issues.

6 participants