Skip to content
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

Support completion for --cluster and --user #44251

Conversation

superbrothers
Copy link
Member

@superbrothers superbrothers commented Apr 9, 2017

What this PR does / why we need it:

kubectl is supported completion for --cluster and --user.

$ kubectl --user=<tab>
--user=minikube  --user=user01

$ kubectl --cluster=<tab>
--cluster=cluster01  --cluster=minikube

Which issue this PR fixes (optional, in fixes #<issue number>(, fixes #<issue_number>, ...) format, will close that issue when PR gets merged): fixes #

Special notes for your reviewer:

Release note:

Add completion support for --cluster and --user to kubectl

With this commit, kubectl is supported completion for `--cluster` and `--user`.

```
$ kubectl --user=<tab>
--user=minikube  --user=user01

$ kubectl --cluster=<tab>
--cluster=cluster01  --cluster=minikube
```
@k8s-ci-robot k8s-ci-robot added the cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. label Apr 9, 2017
@k8s-reviewable
Copy link

This change is Reviewable

@k8s-ci-robot
Copy link
Contributor

Hi @superbrothers. Thanks for your PR.

I'm waiting for a kubernetes member to verify that this patch is reasonable to test. If it is, they should reply with @k8s-bot 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.

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.

@k8s-github-robot k8s-github-robot added size/M Denotes a PR that changes 30-99 lines, ignoring generated files. release-note-label-needed labels Apr 9, 2017
@adohe-zz
Copy link

adohe-zz commented Apr 9, 2017

@k8s-bot ok to test

@adohe-zz
Copy link

adohe-zz commented Apr 9, 2017

/assign @adohe

@superbrothers
Copy link
Member Author

As far as I see the above test, it seems that this failure does not related to this PR.

@adohe-zz
Copy link

adohe-zz commented Apr 9, 2017

@k8s-bot verify test this

@superbrothers
Copy link
Member Author

What state does this PR? Should I do something?

@soltysh
Copy link
Contributor

soltysh commented Apr 12, 2017

@superbrothers this looks ok, mind updating the release notes in the initial comment so that it reflects the newly added feature?

@superbrothers
Copy link
Member Author

@soltysh Thank you for your comment. I updated the release note in the initial comment.

@k8s-github-robot k8s-github-robot added release-note Denotes a PR that will be considered when it comes time to generate release notes. and removed release-note-label-needed labels Apr 12, 2017
@soltysh
Copy link
Contributor

soltysh commented Apr 12, 2017

/lgtm

You need to wait for Fabiano or TonyAdo to approve it.

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Apr 12, 2017
@fabianofranz
Copy link
Contributor

/approve

@k8s-github-robot
Copy link

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: fabianofranz, soltysh, superbrothers

Needs approval from an approver in each of these OWNERS Files:

You can indicate your approval by writing /approve in a comment
You can cancel your approval by writing /approve cancel in a comment

@k8s-github-robot k8s-github-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Apr 12, 2017
@superbrothers
Copy link
Member Author

Umm... It seems that e2e testing failed again where is unrelated to this PR.

@soltysh
Copy link
Contributor

soltysh commented Apr 13, 2017

@k8s-bot cvm gce e2e test this

@k8s-github-robot
Copy link

Automatic merge from submit-queue

@k8s-github-robot k8s-github-robot merged commit c3463d7 into kubernetes:master Apr 13, 2017
@superbrothers superbrothers deleted the completion-cluster-user-flags branch April 13, 2017 21:22
}

# $1 has to be "contexts", "clusters" or "users"
__kubectl_config_get()
Copy link
Member

Choose a reason for hiding this comment

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

Should be __kubectl_parse_config()

Copy link
Member

Choose a reason for hiding this comment

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

This breaks #29386

calebamiles added a commit to kubernetes/enhancements that referenced this pull request Jun 29, 2017
seans3 pushed a commit to seans3/kubernetes that referenced this pull request Apr 10, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. lgtm "Looks good to me", indicates that a PR is ready to be merged. release-note Denotes a PR that will be considered when it comes time to generate release notes. size/M Denotes a PR that changes 30-99 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

8 participants