-
Notifications
You must be signed in to change notification settings - Fork 68
(Blocked by https://github.com/elastic/crd-ref-docs/pull/192) 🌱 Replace deprecated marker for required fields #2407
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
base: main
Are you sure you want to change the base?
Conversation
✅ Deploy Preview for olmv1 ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
This PR modernizes the API type definitions by replacing the deprecated +kubebuilder:validation:Required marker with the newer +required marker across all API types. The change is purely a marker update with no functional impact on the generated CRDs.
- Replaces
+kubebuilder:validation:Requiredwith+requiredin all API type definitions - Updates auto-generated API reference documentation to reflect the new marker format
- Applies the change consistently across ClusterExtension, ClusterExtensionRevision, and ClusterCatalog types
Reviewed changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
hack/tools/crd-generator/testdata/api/v1/clusterextension_types.go |
Updates test data for CRD generator with new required field marker |
api/v1/clusterextension_types.go |
Replaces deprecated required marker in ClusterExtension type definitions |
api/v1/clusterextensionrevision_types.go |
Replaces deprecated required marker in ClusterExtensionRevision type definitions |
api/v1/clustercatalog_types.go |
Replaces deprecated required marker in ClusterCatalog type definitions |
docs/api-reference/olmv1-api-reference.md |
Updates auto-generated API documentation to reflect new marker format |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #2407 +/- ##
=======================================
Coverage 68.82% 68.82%
=======================================
Files 100 100
Lines 7641 7641
=======================================
Hits 5259 5259
Misses 1947 1947
Partials 435 435
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
| | --- | --- | --- | --- | | ||
| | `name` _string_ | name is required and follows the DNS subdomain standard as defined in [RFC 1123].<br />It must contain only lowercase alphanumeric characters, hyphens (-) or periods (.),<br />start and end with an alphanumeric character, and be no longer than 253 characters. | | Required: \{\} <br /> | | ||
| | `version` _string_ | version is required and references the version that this bundle represents.<br />It follows the semantic versioning standard as defined in https://semver.org/. | | Required: \{\} <br /> | | ||
| | `name` _string_ | name is required and follows the DNS subdomain standard as defined in [RFC 1123].<br />It must contain only lowercase alphanumeric characters, hyphens (-) or periods (.),<br />start and end with an alphanumeric character, and be no longer than 253 characters. | | | |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
/hold
github.com/elastic/crd-ref-docs
need to recognize the required field too.
The redundante marker should no longer be used.
More info: kubernetes-sigs/controller-tools#1241
Motivation
kube-api-linter only recognize // +required and not the kubebuilder marker