enhancements icon indicating copy to clipboard operation
enhancements copied to clipboard

Declarative Validation Of Kubernetes Native Types With validation-gen

Open aaron-prindle opened this issue 10 months ago β€’ 31 comments

Enhancement Description

  • One-line enhancement description (can be used as a release note): Implement declarative validation of Kubernetes native types using validation-gen to generate validation code.
  • Kubernetes Enhancement Proposal: KEP 5073
  • Discussion Link: https://github.com/kubernetes/enhancements/pull/5074
  • Primary contact (assignee): @aprindle
  • Responsible SIGs: sig-api-machinery
  • Enhancement target (which target equals to which milestone):
    • Beta release target (x.y): 1.33
    • Stable release target (x.y):

Beta

  • [x] KEP ( k/enhancements ) update PR(s):
    • [x] https://github.com/kubernetes/enhancements/pull/5074
  • [x] Code ( k/k ) update PR(s):
    • [x] Migrate to declarative validation - ReplicationController spec.replicas and spec.minReadySeconds fields: https://github.com/kubernetes/kubernetes/pull/130725
    • [x] Enable Declarative Validation for ReplicationController: https://github.com/kubernetes/kubernetes/pull/130724
    • [x] add declarative validation metrics and associated runtime verification tests: https://github.com/kubernetes/kubernetes/pull/130705
    • [x] Add default + optional handling: https://github.com/kubernetes/kubernetes/pull/130706
    • [x] add Add CoveredByDeclarative to field error struct: https://github.com/kubernetes/kubernetes/pull/130695
    • [x] add feature gates: https://github.com/kubernetes/kubernetes/pull/130478, https://github.com/kubernetes/kubernetes/pull/130703
    • [x] add validation-gen framework: https://github.com/kubernetes/kubernetes/pull/130349
  • [ ] Docs ( k/website ) update PR(s):
    • [ ] Declarative Validation Docs website: https://github.com/kubernetes/website/pull/49732

Please keep this description up to date. This will help the Enhancement Team to track the evolution of the enhancement efficiently.

aaron-prindle avatar Jan 22 '25 19:01 aaron-prindle

/sig api-machinery /wg api-machinery

aaron-prindle avatar Jan 22 '25 19:01 aaron-prindle

@aaron-prindle: The label(s) wg/api-machinery cannot be applied, because the repository doesn't have them.

In response to this:

/sig api-machinery /wg api-machinery

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 avatar Jan 22 '25 19:01 k8s-ci-robot

/label lead-opted-in /milestone v1.33

jpbetz avatar Jan 22 '25 20:01 jpbetz

Hello @aaron-prindle πŸ‘‹, v1.33 Enhancements team here.

Just checking in as we approach enhancements freeze on 02:00 UTC Friday 14th February 2025 / 19:00 PDT Thursday 13th February 2025.

This enhancement is targeting stage beta for v1.33 (correct me, if otherwise) /stage beta

Here's where this enhancement currently stands:

  • [ ] KEP readme using the latest template has been merged into the k/enhancements repo.
  • [ ] KEP status is marked as implementable for latest-milestone: v1.33.
  • [ ] KEP readme has up-to-date graduation criteria
  • [ ] KEP has a production readiness review that has been completed and merged into k/enhancements. (For more information on the PRR process, check here). If your production readiness review is not completed yet, please make sure to fill the production readiness questionnaire in your KEP by the PRR Freeze deadline on Thursday 6th February 2025 so that the PRR team has enough time to review your KEP.

For this KEP, we would just need to update the following:

  • Create the KEP readme using the latest template and merge it in the k/enhancements repo.
  • Ensure that the KEP has undergone a production readiness review and has been merged into k/enhancements.

The status of this enhancement is marked as At risk for enhancements freeze. Please keep the issue description up-to-date with appropriate stages as well.

If you anticipate missing enhancements freeze, you can file an exception request in advance. Thank you!

lzung avatar Feb 02 '25 08:02 lzung

Hi @aaron-prindle πŸ‘‹, 1.33 Enhancements team here,

Just a quick friendly reminder as we approach the enhancements freeze later this week, at 02:00 UTC Friday 14th February 2025 / 19:00 PDT Thursday 13th February 2025.

The current status of this enhancement is marked as At risk for enhancement freeze. There are a few requirements mentioned in the comment https://github.com/kubernetes/enhancements/issues/5073#issuecomment-2629288758 that still need to be completed.

If you anticipate missing enhancements freeze, you can file an exception request in advance. Thank you!

dipesh-rawat avatar Feb 10 '25 20:02 dipesh-rawat

Thanks @lzung and @dipesh-rawat. The goal for the KEP currently is to get it merged before the enhancements freeze for 1.33. From the comments above I believe for this KEP, we would just need to update/complete the following:

  • [WIP - not merged] Create the KEP readme using the latest template and merge it in the k/enhancements repo.
    • KEP is submitted (not merged yet), see PR under review here - https://github.com/kubernetes/enhancements/pull/5074
  • [WIP - not merged] Ensure that the KEP has undergone a production readiness review and has been merged into k/enhancements.
    • We have a lead opted in and PRR review approval on the KEP but it isn't currently merged (see comment here - https://github.com/kubernetes/enhancements/pull/5074#issuecomment-2638176863)

We are currently in the process (see KEP PR here - https://github.com/kubernetes/enhancements/pull/5074) and are working with the necessary reviewers to get this in before the enhancements freeze (assuming no major blockers from reviewers). Currently I believe we will be able to get the KEP merged prior the enhancements freeze date.

aaron-prindle avatar Feb 10 '25 20:02 aaron-prindle

Hello @aaron-prindle :wave:, v1.33 Docs Shadow here.

Does this enhancement work planned for v1.33 require any new docs or modification to existing docs? If so, please follow the steps here to open a PR against dev-1.33 branch in the k/website repo. This PR can be just a placeholder at this time and must be created before Thursday 27th February 2025 18:00 PDT.

Also, take a look at Documenting for a release to get yourself familiarize with the docs requirement for the release. Thank you!

hacktivist123 avatar Feb 12 '25 17:02 hacktivist123

@hacktivist123 thanks for the information here! The KEP adds 2 feature gates which should be documented in the k/website repo. I have followed the steps posted (link) and submitted a draft PR to k/website, PR here: https://github.com/kubernetes/website/pull/49732

aaron-prindle avatar Feb 12 '25 22:02 aaron-prindle

Hello @aaron-prindle πŸ‘‹, v1.33 Enhancements team here.

Unfortunately, this enhancement did not meet requirements for enhancements freeze.

If you still wish to progress this enhancement in v1.33, please file an exception request as soon as possible, within three days. If you have any questions, you can reach out in the #release-enhancements channel on Slack and we'll be happy to help. Thanks!

Looks like PR https://github.com/kubernetes/enhancements/pull/5074 to update the KEP files misses to add the Release Signoff Checklist in the README file from the latest template (here).

/milestone clear

dipesh-rawat avatar Feb 14 '25 02:02 dipesh-rawat

@dipesh-rawat - thanks for the information here. I have submitted a PR to fix the issue with the Release Signoff Checklist: https://github.com/kubernetes/enhancements/pull/5171

The KEP itself was reviewed and approved by a Sig Lead - @deads2k and had PRR review and approval from - @jpbetz

I have submitted an exception request following the guide here to: [email protected], [email protected], [email protected] If possible, can you confirm that with that PR the KEP would be compliant and be allowed into 1.33? I am not sure how that section was missed (sorry!) so just want to maybe get some confirmation that we would meet the necessary criteria if that PR is merged. Thanks

aaron-prindle avatar Feb 14 '25 07:02 aaron-prindle

@aaron-prindle Since the release team has APPROVED the exception request here. This will be considered to be added to the milestone for v1.33 release.

dipesh-rawat avatar Feb 14 '25 16:02 dipesh-rawat

@aaron-prindle Now that PRs https://github.com/kubernetes/enhancements/pull/5074 https://github.com/kubernetes/enhancements/pull/5171 has been merged, all the KEP requirements are in place and merged into k/enhancements, this enhancement is all good for the upcoming enhancements freeze. πŸš€

The status of this enhancement is marked as tracked for enhancement freeze. Please keep the issue description up-to-date with appropriate stages as well. Thank you! (cc: @lzung)

/milestone v1.33 /label tracked/yes

dipesh-rawat avatar Feb 14 '25 16:02 dipesh-rawat

Hi @aprindle @aaron-prindle πŸ‘‹ -- this is Aakanksha (@aakankshabhende ) from the 1.33 Communications Team!

For the 1.33 release, we are currently in the process of collecting and curating a list of potential feature blogs, and we'd love for you to consider writing one for your enhancement!

As you may be aware, feature blogs are a great way to communicate to users about features which fall into (but not limited to) the following categories:

  • This introduces some breaking change(s)
  • This has significant impacts and/or implications to users
  • ...Or this is a long-awaited feature, which would go a long way to cover the journey more in detail πŸŽ‰

To opt in to write a feature blog, could you please let us know and open a "Feature Blog placeholder PR" (which can be only a skeleton at first) against the website repository by Wednesday, 5th March, 2025? For more information about writing a blog, please find the blog contribution guidelines πŸ“š

[!Tip] Some timeline to keep in mind:

  • 02:00 UTC Wednesday, 5th March, 2025: Feature blog PR freeze
  • Monday, 7th April, 2025: Feature blogs ready for review
  • You can find more in the release document

[!Note] In your placeholder PR, use XX characters for the blog date in the front matter and file name. We will work with you on updating the PR with the publication date once we have a final number of feature blogs for this release.

aakankshabhende avatar Mar 01 '25 02:03 aakankshabhende

Hey again @aaron-prindle πŸ‘‹, 1.33 Enhancements team here,

Just checking in as we approach code freeze at 02:00 UTC Friday 21st March 2025 / 19:00 PDT Thursday 20th March 2025. .

Here's where this enhancement currently stands:

  • [ ] All PRs to the Kubernetes repo that are related to your enhancement are linked in the above issue description (for tracking purposes).
  • [ ] All PRs are ready to be merged (they have approved and lgtm labels applied) by the code freeze deadline. This includes tests.

For this enhancement, it looks like the following PRs need to be merged before code freeze (and we need to update the Issue description to include all the related PRs of this KEP):

  • https://github.com/kubernetes/kubernetes/pull/130355
  • https://github.com/kubernetes/kubernetes/pull/130478

Additionally, please let me know if there are any other PRs in k/k not listed above that we should track for this KEP, so that we can maintain accurate status.

If you anticipate missing code freeze, you can file an exception request in advance.

The status of this enhancement is marked as at risk for code freeze.

lzung avatar Mar 03 '25 21:03 lzung

Hi @aaron-prindle πŸ‘‹ -- this is Aakanksha (@aakankshabhende ) from 1.33 Communications Team here again!

This is a gentle reminder for the feature blog deadline mentioned above, which is 02:00 UTC Wednesday, 5th March, 2025. To opt in, please let us know and open a Feature Blog placeholder PR against k/website by the deadline. If you have any questions, please feel free to reach out to us!

[!Tip] Some timeline to keep in mind:

  • 02:00 UTC Wednesday, 5th March, 2025: Feature blog PR freeze
  • Monday, 7th April, 2025: Feature blogs ready for review
  • You can find more in the release document

[!Note] In your placeholder PR, use XX characters for the blog date in the front matter and file name. We will work with you on updating the PR with the publication date once we have a final number of feature blogs for this release.

aakankshabhende avatar Mar 04 '25 09:03 aakankshabhende

Hey again @aaron-prindle πŸ‘‹ I see that https://github.com/kubernetes/kubernetes/pull/130355 and https://github.com/kubernetes/kubernetes/pull/130478 were recently approved and merged. I'm updating this KEP to Tracked for code freeze πŸŽ‰

lzung avatar Mar 04 '25 19:03 lzung

Hi @aaron-prindle πŸ‘‹, 1.34 Enhancements Lead here.

I am closing the v1.33 milestone now.

If you'd like to work on this enhancement in v1.34, please have the SIG lead opt-in by adding the lead-opted-in label, which ensures it gets added to the tracking board. Also, please set the milestone to v1.34 using /milestone v1.34.

Thanks!

/remove-label lead-opted-in /remove-label tracked/yes /milestone clear

jenshu avatar May 16 '25 16:05 jenshu

/milestone v1.34 /cc @jpbetz for the lead opt-in label

aaron-prindle avatar May 16 '25 16:05 aaron-prindle

@aaron-prindle: You must be a member of the kubernetes/milestone-maintainers GitHub team to set the milestone. If you believe you should be able to issue the /milestone command, please contact your Milestone Maintainers Team and have them propose you as an additional delegate for this responsibility.

In response to this:

/milestone v1.34 /cc @jpbetz for the lead opt-in label

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 avatar May 16 '25 16:05 k8s-ci-robot

/milestone v1.34 /label lead-opted-in

jpbetz avatar May 21 '25 23:05 jpbetz

@aaron-prindle @jpbetz can you confirm if this is targeting beta again for 1.34?

jenshu avatar May 28 '25 05:05 jenshu

Yes, this would be targeting beta again for 1.34.

aaron-prindle avatar May 28 '25 05:05 aaron-prindle

Hi @aaron-prindle πŸ‘‹, v1.34 Enhancements team here.

This is a reminder of the upcoming PRR Freeze on Thursday 12th June 2025.

By this date, there must be a PR open in k/enhancements with:

  • The KEP's PRR questionnaire filled out.
  • The kep.yaml updated with the stage, latest-milestone, and milestone struct filled out.
  • A PRR approval file with the PRR approver listed for the stage the KEP is targeting.

Having the PRR questionnaire filled out by this deadline will help ensure that the PRR team has enough time to review your KEP before Enhancements Freeze on Friday 20th June 2025. For more information on the PRR process, see here.

rayandas avatar Jun 06 '25 03:06 rayandas

@rayandas Declarative Validation (KEP 5073) has no stage changes in v1.34. There is only additional work on the feature being done in v1.34 and expansion into one additional type is planned (eg: the PRR review would be the same IIUC)

Declarative Validation (KEP 5073) passed PRR review in v1.33: https://github.com/kubernetes/enhancements/issues/5073#issuecomment-2658518595

The KEP itself was reviewed [in v1.33] ... and had PRR review and approval from - @jpbetz

PRR approval on the KEP https://github.com/kubernetes/enhancements/pull/5074#issuecomment-2638176863

Can you confirm if there is still work to be done here given this? Thanks.

aaron-prindle avatar Jun 06 '25 23:06 aaron-prindle

If any change that you are planning to do in 1.34 could be user-visible (think "deserves a release note"), then the issue should be tracked by the release team, which means it needs "lead-opted-in" and the milestone. The KEP update then can simply bump the "latest-milestone" to 1.34.

pohly avatar Jun 10 '25 08:06 pohly

In the issue description, you can then have "Beta - v1.33" and "Beta - v1.34" to be more clear about what was and what is being done.

pohly avatar Jun 10 '25 08:06 pohly

Thanks for the information here @pohly, I've submitted a PRR PR with the information suggested: https://github.com/kubernetes/enhancements/pull/5396

aaron-prindle avatar Jun 11 '25 01:06 aaron-prindle

https://github.com/kubernetes/enhancements/pull/5396 merged, @rayandas I believe KEP 5073 should be good for v1.34 Enhancements PRR Freeze πŸ‘ . Thanks for the information around this

aaron-prindle avatar Jun 11 '25 21:06 aaron-prindle

Hello again @aaron-prindle :wave:, v1.34 Enhancements team here.

Just checking in as we approach enhancements freeze on 21:00 UTC Friday 20th June 2025 / 14:00 PST Friday 20th June 2025.

This enhancement is targeting stage beta for v1.34 (correct me, if otherwise)

Here’s where this enhancement currently stands:

  • [x] KEP readme using the latest template has been merged into the k/enhancements repo.
  • [x] KEP status is marked as implementable for latest-milestone: v1.34.
  • [x] KEP readme has up-to-date graduation criteria.
  • [x] KEP has submitted a production readiness review request for approval and has a reviewer assigned.
  • [x] KEP has a production readiness review that has been completed and merged into k/enhancements. (For more information on the PRR process, check here).

With all the KEP requirements in place and merged into k/enhancements, this enhancement is all good for the upcoming enhancements freeze. :rocket:

The status of this enhancement is marked as Tracked for enhancements freeze. Please keep the issue description up-to-date with appropriate stages as well.

Thank you!

rayandas avatar Jun 12 '25 13:06 rayandas

Hi @aaron-prindle πŸ‘‹ -- this is Graziano (@graz-dev) from the 1.34 Communications Team!

For the 1.34 release, we are currently in the process of collecting and curating a list of potential feature blogs, and we'd love for you to consider writing one for your enhancement!

As you may be aware, feature blogs are a great way to communicate to users about features which fall into (but not limited to) the following categories:

  • This introduces some breaking change(s)
  • This has significant impacts and/or implications to users
  • ...Or this is a long-awaited feature, which would go a long way to cover the journey more in detail πŸŽ‰

To opt in to write a feature blog, could you please let us know and open a "Feature Blog placeholder PR" (which can be only a skeleton at first) against the website repository by Friday 11th July? For more information about writing a blog, please find the blog contribution guidelines πŸ“š

[!Tip] Some timeline to keep in mind:

  • 02:00 UTC Friday 11th July 2025: Feature blog PR freeze
  • Friday 8th August 2025: Feature blogs ready for review
  • You can find more in the release document

[!Note] In your placeholder PR, use XX characters for the blog date in the front matter and file name. We will work with you on updating the PR with the publication date once we have a final number of feature blogs for this release.

graz-dev avatar Jun 21 '25 12:06 graz-dev