-
Notifications
You must be signed in to change notification settings - Fork 427
[WIP] Add Bind command to kcp apis #3767
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
base: main
Are you sure you want to change the base?
Conversation
Signed-off-by: Geetika Batra <[email protected]>
|
[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 |
|
PR needs rebase. 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. |
|
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. |
| // NewCmdAPIs creates the apis command with subcommands for managing APIBindings | ||
| func NewCmdAPIs(streams genericclioptions.IOStreams) *cobra.Command { | ||
| cmd := &cobra.Command{ | ||
| Use: "apis", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
kcp uses staging repo pattern (same as k8s). main cli module lives in go/src/github.com/kcp-dev/kcp/staging/src/github.com/kcp-dev/cli/cmd/kubectl-kcp/cmd/kubectlKcp.go
And this is where bind command already exists. It needs to be extended to have all these cli extensions to managing apis.
For now ew have only:
bind apiexport root:my-service:my-export --name my-binding --reject-permission-claim secrets.core,configmaps.core
And no list, accept, reject subcommands.
I would recommend first skeleton proposed cli structure ontop of what we have without even writing any code so we can discuss it, review and code should be easy once we agree on semantics of the cli.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@mjudeikis From the #1935 what I understand is we need to build a new command kubectl kcp apis. This could not be an extension of bind apiexport I reckon. I understand that the issue requests a to create a new kubectl kcp apis bind command to bind to an APIExport by creating an APIBinding. This reuses the existing bind plugin logic while introducing an apis parent command for future extensibility. Please correct me if I am wrong.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is why I suggest to skeleton CLI commands first, without writing code.
I dont have strong opinions how and where this should land, but more that it should not be confusing. Like we already have kcp claims get , kcp bind, kcp crd so if this should be User intuitive first.
So maybe its part of bind maybe its separate. Its very hard to imagine how it would be done without some mock commands, like:
kubectl kcp bind apiexport root:my-service:my-export --name my-binding --reject-permission-claim secrets.core,configmaps.core
kubectl kcp bind list # list bounded apis (or should it be kubectl kcp apis?)
kubectl kcp apiexports ????
kubectl kcp apis ????
so once we have a mini sketch, we can discuss this in the chat or in the community meeting. The chellenge here is that anything we do now will be base for all the future work in this area, so we need to make sure we do the right thing now.
Issue was created before we had bind command at all so this might have some disconnect and we need to reconnect it back.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ohh Okay! Lemme then rethink through the structure with pros and cons of each command. I will come up with a plan.
Summary
What Type of PR Is This?
Related Issue(s)
Fixes #
Release Notes