kubebuilder
kubebuilder copied to clipboard
Kubebuilder validation markers are documented multiple times
Kubebuilder book defines the same marker multiple times. https://book.kubebuilder.io/reference/markers/crd-validation.html
Is that by mistake? If yes, can you please fix this? It is very confusing to a new user of these markers.
/kind bug
Hi @tamalsaha,
Could you please let us know what marker is duplicated? See that, for example, the marker kubebuilder:validation:MaxItems is not equals kubebuilder:validation:MaxLength and the idea here is to allow users to check all options.
Pretty much the entire block of markers is duplicated after //+optional from what I can see.
Might be something with the marker generation script.
/kind documentation
I see what you mean 👍 . Note that first, all options are (on field) then it has (on type). However, I agree that it is something that requires attention.
Issues go stale after 90d of inactivity.
Mark the issue as fresh with /remove-lifecycle stale.
Stale issues rot after an additional 30d of inactivity and eventually close.
If this issue is safe to close now please do so with /close.
Send feedback to sig-testing, kubernetes/test-infra and/or fejta. /lifecycle stale
Stale issues rot after 30d of inactivity.
Mark the issue as fresh with /remove-lifecycle rotten.
Rotten issues close after an additional 30d of inactivity.
If this issue is safe to close now please do so with /close.
Send feedback to sig-testing, kubernetes/test-infra and/or fejta. /lifecycle rotten
/lifecycle frozen
/remove-lifecycle rotten
These duplicated markers are actually not duplicated, but correspond to markers used for types vs fields. We can amend the documentation to deduplicate the appearance of markers and specify that a marker can be used on types and fields.
IMO, we should make clear that markers are grouped by targets (field, type, ...), and therefore if a marker is valid for different targets it will appear in both sections, instead of removing them (or deduplicating them). Maybe even explicitly splitting them into targets using second-level titles.
This issue has not been updated in over 1 year, and should be re-triaged.
You can:
- Confirm that this issue is still relevant with
/triage accepted(org members only) - Close this issue with
/close
For more details on the triage process, see https://www.kubernetes.dev/docs/guide/issue-triage/
/remove-triage accepted