Skip to content

[WIP] Add accept and reject commands to kcp claims cli#3782

Draft
geetikabatra wants to merge 1 commit intokcp-dev:mainfrom
geetikabatra:topic/geetika/claimscli
Draft

[WIP] Add accept and reject commands to kcp claims cli#3782
geetikabatra wants to merge 1 commit intokcp-dev:mainfrom
geetikabatra:topic/geetika/claimscli

Conversation

@geetikabatra
Copy link

Summary

What Type of PR Is This?

Related Issue(s)

Fixes #

Release Notes

NONE

@kcp-ci-bot kcp-ci-bot added release-note-none Denotes a PR that doesn't merit a release note. do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. labels Jan 12, 2026
@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 assign embik for approval. For more information see the Kubernetes Code Review Process.

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

Details 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 do-not-merge/needs-kind Indicates a PR lacks a `kind/foo` label and requires one. size/XL Denotes a PR that changes 500-999 lines, ignoring generated files. dco-signoff: no Indicates the PR's author has not signed the DCO. labels Jan 12, 2026
@kcp-ci-bot
Copy link
Contributor

Thanks for your pull request. Before we can look at it, you'll need to add a 'DCO signoff' to your commits.

📝 Please follow instructions in the contributing guide to update your commits with the DCO

Full details of the Developer Certificate of Origin can be found at developercertificate.org.

The list of commits missing DCO signoff:

  • 8a44483 Add accept and reject commands to kcp claims cli
Details

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. I understand the commands that are listed here.

@kcp-ci-bot kcp-ci-bot added the needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. label Jan 12, 2026
@kcp-ci-bot
Copy link
Contributor

Hi @geetikabatra. Thanks for your PR.

I'm waiting for a kcp-dev member to verify that this patch is reasonable to test. If it is, they should reply with /ok-to-test on its own line. Until that is done, I will not automatically test new commits in this PR, but the usual testing commands by org members will still work. Regular contributors should join the org to skip this step.

Once the patch is verified, the new status will be reflected by the ok-to-test label.

I understand the commands that are listed here.

Details

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

Copy link
Contributor

@mjudeikis mjudeikis left a comment

Choose a reason for hiding this comment

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

very nice start :) this looks close


func (a *AcceptClaimOptions) BindFlags(cmd *cobra.Command) {
a.Options.BindFlags(cmd)
cmd.Flags().StringVar(&a.IdentityHash, "identity-hash", "", "Identity hash of the claim (optional, used to disambiguate claims with the same group.resource)")
Copy link
Contributor

Choose a reason for hiding this comment

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

Nice one. Can we add this into example above. I had questions how one would deal if lets say dealing with secrets.core and secrets.external

Copy link
Author

Choose a reason for hiding this comment

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

Good point! I'll add an example showing how to use the --identity-hash flag. Regarding secrets.core and 'secrets.external1. This should be handled by the claims structure. . If it is not empty, claims would refer to the Group resource otherwise fall back to default.

return nil
}

func (b *apiBindingV1alpha1) Update(ctx context.Context, client kcpclientset.Interface) error {
Copy link
Contributor

Choose a reason for hiding this comment

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

Why do we need this helper function? It basically touches the API and leaks into API. I would prefer this in the code

return nil
}

func (b *apiBindingV1alpha1) GetPermissionClaims() []apisv1alpha2.AcceptablePermissionClaim {
Copy link
Contributor

Choose a reason for hiding this comment

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

if we want to have this lets name when accordingly:
GetAcceptablePermissionClaims and add code comments on the functions

return alpha2Claims
}

func (b *apiBindingV1alpha1) GetExportPermissionClaims() []apisv1alpha2.PermissionClaim {
Copy link
Contributor

Choose a reason for hiding this comment

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

same as above.

return b.binding.Name
}

func (b *apiBindingV1alpha2) Update(ctx context.Context, client kcpclientset.Interface) error {
Copy link
Contributor

Choose a reason for hiding this comment

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

same as above. Lets not leak in clietns in here

@mjudeikis
Copy link
Contributor

  • you need to sign you commits

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

dco-signoff: no Indicates the PR's author has not signed the DCO. do-not-merge/needs-kind Indicates a PR lacks a `kind/foo` label and requires one. do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. release-note-none Denotes a PR that doesn't merit a release note. size/XL Denotes a PR that changes 500-999 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants