Skip to content

Add verbs bundle validation #3429

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

Closed
wants to merge 1 commit into from

Conversation

mjudeikis
Copy link
Contributor

Summary

Add verbs bundles validation for permissionsClaims

What Type of PR Is This?

/kind feature

Related Issue(s)

Fixes #

Release Notes

Add PermissionClaims verbs bundles admission.

@kcp-ci-bot kcp-ci-bot added release-note Denotes a PR that will be considered when it comes time to generate release notes. kind/feature Categorizes issue or PR as related to a new feature. dco-signoff: yes Indicates the PR's author has signed the DCO. labels May 26, 2025
@kcp-ci-bot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by:
Once this PR has been reviewed and has the lgtm label, please ask for approval from mjudeikis. For more information see the Kubernetes Code Review Process.

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

Needs approval from an approver in each of these files:

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

@kcp-ci-bot kcp-ci-bot added kind/api-change Categorizes issue or PR as related to adding, removing, or otherwise changing an API size/L Denotes a PR that changes 100-499 lines, ignoring generated files. labels May 26, 2025
@mjudeikis mjudeikis force-pushed the mjudeikis/verb.bundling branch 3 times, most recently from 1344f1a to ede3efd Compare May 27, 2025 04:55
Signed-off-by: Mangirdas Judeikis <[email protected]>
On-behalf-of: @SAP [email protected]
@mjudeikis mjudeikis force-pushed the mjudeikis/verb.bundling branch from ede3efd to 3c441fc Compare May 27, 2025 05:16
// validateVerbsBundle validates that the verbs are a valid bundle according
// to the following rules:
// get | possible standalone
// list -> get, watch | if list requested, always requires get and watch too
Copy link
Member

Choose a reason for hiding this comment

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

Not to bikeshed this list into all of eternity, but I wonder if watch should be a requirement for list now? A script/tool that just fetches all objects doesn't necessarily create a watch on the objects.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

But idea is that you can get objects data. So its still "read" type of action

Copy link
Member

Choose a reason for hiding this comment

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

+1 to what @embik said, I can see valid cases where you want to allow list, but not watch, there are in a way distinct verbs.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

In my head its more about "what operations you can do to the object, and less about the kube world". Does it give you same access as other verbs in the bundle, when yes.

And again, we can always relax it later, where making it stricted it would be breaking change.

@embik
Copy link
Member

embik commented May 30, 2025

I think we should add documentation for this in this PR. I'm not 100% sure where to put it in the docs, but this extra validation should at least be mentioned somewhere.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dco-signoff: yes Indicates the PR's author has signed the DCO. kind/api-change Categorizes issue or PR as related to adding, removing, or otherwise changing an API kind/feature Categorizes issue or PR as related to a new feature. release-note Denotes a PR that will be considered when it comes time to generate release notes. size/L Denotes a PR that changes 100-499 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants