[WIP] Add accept and reject commands to kcp claims cli#3782
[WIP] Add accept and reject commands to kcp claims cli#3782geetikabatra wants to merge 1 commit intokcp-dev:mainfrom
Conversation
|
[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 |
|
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:
DetailsInstructions 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. |
|
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 Once the patch is verified, the new status will be reflected by the I understand the commands that are listed here. DetailsInstructions 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. |
mjudeikis
left a comment
There was a problem hiding this comment.
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)") |
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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 { |
There was a problem hiding this comment.
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 { |
There was a problem hiding this comment.
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 { |
| return b.binding.Name | ||
| } | ||
|
|
||
| func (b *apiBindingV1alpha2) Update(ctx context.Context, client kcpclientset.Interface) error { |
There was a problem hiding this comment.
same as above. Lets not leak in clietns in here
|
Summary
What Type of PR Is This?
Related Issue(s)
Fixes #
Release Notes