Skip to content

Conversation

@geetikabatra
Copy link

Summary

What Type of PR Is This?

Related Issue(s)

Fixes #

Release Notes

NONE

Signed-off-by: Geetika Batra <[email protected]>
@kcp-ci-bot kcp-ci-bot added do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. release-note-none Denotes a PR that doesn't merit a release note. dco-signoff: yes Indicates the PR's author has signed the DCO. labels Dec 18, 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 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. needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. labels Dec 18, 2025
@kcp-ci-bot
Copy link
Contributor

PR needs rebase.

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.

@kcp-ci-bot kcp-ci-bot added size/L Denotes a PR that changes 100-499 lines, ignoring generated files. needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. labels Dec 18, 2025
@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.

@geetikabatra geetikabatra changed the title Add Bind command to kcp apis [WIP] Add Bind command to kcp apis Dec 18, 2025
// NewCmdAPIs creates the apis command with subcommands for managing APIBindings
func NewCmdAPIs(streams genericclioptions.IOStreams) *cobra.Command {
cmd := &cobra.Command{
Use: "apis",
Copy link
Contributor

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.

Copy link
Author

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.

Copy link
Contributor

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.

Copy link
Author

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.

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. 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. needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. release-note-none Denotes a PR that doesn't merit a release note. 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.

3 participants