Skip to content

CRDs + examples should be validated with presubmits #679

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
robscott opened this issue Apr 11, 2025 · 0 comments
Open

CRDs + examples should be validated with presubmits #679

robscott opened this issue Apr 11, 2025 · 0 comments
Labels
help wanted Denotes an issue that needs help from a contributor. Must meet "help wanted" guidelines. triage/accepted Indicates an issue or PR is ready to be actively worked on.

Comments

@robscott
Copy link
Member

What would you like to be added:
We should add presubmits that verify that:

  1. All examples in our docs are valid
  2. Our CRDs are valid

To get to 1), we'll need to transition to embedding YAML examples from files in docs instead of adding the YAML directly to the markdown, similar to Gateway API. A large portion of this can be copied verbatim from Gateway API with https://github.com/kubernetes-sigs/gateway-api/blob/36514bbcaba862aea7a630105a3c8859a766feec/hack/test-crds-validation.sh#L113-L142.

With that said, presubmits would run even faster if we could do this with https://github.com/kubernetes-sigs/kubectl-validate.

Why is this needed:
It's very easy for examples in our docs to get out of sync with our API unless we have some automation for this.

@kfswain kfswain added help wanted Denotes an issue that needs help from a contributor. Must meet "help wanted" guidelines. triage/accepted Indicates an issue or PR is ready to be actively worked on. labels Apr 24, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Denotes an issue that needs help from a contributor. Must meet "help wanted" guidelines. triage/accepted Indicates an issue or PR is ready to be actively worked on.
Projects
None yet
Development

No branches or pull requests

2 participants