Skip to content

Conversation

@sbueringer
Copy link
Member

Signed-off-by: Stefan Büringer [email protected]

What this PR does / why we need it:

Which issue(s) this PR fixes (optional, in fixes #<issue number>(, fixes #<issue_number>, ...) format, will close the issue(s) when PR gets merged):
Fixes #

@k8s-ci-robot k8s-ci-robot added the cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. label Sep 2, 2025
@k8s-ci-robot k8s-ci-robot added do-not-merge/needs-area PR is missing an area label size/S Denotes a PR that changes 10-29 lines, ignoring generated files. labels Sep 2, 2025
@k8s-ci-robot k8s-ci-robot added size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. and removed size/S Denotes a PR that changes 10-29 lines, ignoring generated files. labels Sep 2, 2025
- "conditions" # Ensure conditions have the correct json tags and markers.
- "conflictingmarkers"
- "duplicatemarkers" # Ensure there are no exact duplicate markers. for types and fields.
#- "forbiddenmarkers" # Ensure that types and fields do not contain any markers that are forbidden.
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I definitely want to surface the linter here to make folks aware that this exists

@JoelSpeed Do you have any suggestions about markers that we should forbid?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This new rule is actually a basis for other rules to be implemented, e.g. nonullable (Already done) which prevents folks from using +nullable is just a static config to this linter.

At the moment, I think this is really for folks who have custom or specific reasons to prevent the usage of a specific marker.

Scanning through the Kubebuilder markers, its possible as a project that we might decide we don't want anything that is +kubebuilder:validation:Schemaless or uses +kubebuilder:validation:UniqueItems (IIRC this doesn't actually work)

Copy link
Member Author

@sbueringer sbueringer Sep 2, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We need Schemaless in a few cases, but I think we'll have discussions anyway if we want to add this to any new fields. I'll add a rule for UniqueItems.

EDIT: Or maybe I'll just leave it as is for now. I have no plans to start using UniqueItems but if I want to forbid it I would probably want to link to an issue that mentions that it doesn't work (but probably not worth the effort to look this up)

@sbueringer
Copy link
Member Author

/area ci

@k8s-ci-robot k8s-ci-robot added area/ci Issues or PRs related to ci and removed do-not-merge/needs-area PR is missing an area label labels Sep 2, 2025
@sbueringer
Copy link
Member Author

/assign @JoelSpeed @sivchari

@JoelSpeed
Copy link
Contributor

/approve

@k8s-ci-robot k8s-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Sep 2, 2025
@fabriziopandini
Copy link
Member

/approve

@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: fabriziopandini, JoelSpeed

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

The pull request process is described here

Needs approval from an approver in each of these files:
  • OWNERS [JoelSpeed,fabriziopandini]

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

@sivchari
Copy link
Member

sivchari commented Sep 2, 2025

/lgtm

Thx!

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Sep 2, 2025
@k8s-ci-robot
Copy link
Contributor

LGTM label has been added.

Git tree hash: a72d6df930194dc5789264d5a1344f1f1951da79

@k8s-ci-robot k8s-ci-robot merged commit b560d38 into kubernetes-sigs:main Sep 2, 2025
20 checks passed
@k8s-ci-robot k8s-ci-robot added this to the v1.12 milestone Sep 2, 2025
@sbueringer sbueringer deleted the pr-kal-nullable branch September 3, 2025 06:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

approved Indicates a PR has been approved by an approver from all required OWNERS files. area/ci Issues or PRs related to ci cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. lgtm "Looks good to me", indicates that a PR is ready to be merged. size/XS Denotes a PR that changes 0-9 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants