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

Move shell completion generation into 'kubectl completion' command #23801

Merged

Conversation

sttts
Copy link
Contributor

@sttts sttts commented Apr 3, 2016

Remove static shell completion scripts from the repo and add completion command to kubectl:

$ source <(kubectl completion bash)

or

$ source <(kubectl completion zsh)

This makes maintenance easier because no static scripts must be generated and committed anymore in the repo.

Moreover, kubectl is self-contained again for the user including the latest completion code. I am thinking about the use-case of updating kubectl via gcloud (or some package manager). The completion code is always in-sync, without the need to download a contrib/completion/bash/kubectl file from github.

Opinions are welcome /cc @eparis @nak3

Fixes openshift/origin#5290


This change is Reviewable

@k8s-github-robot k8s-github-robot added size/L Denotes a PR that changes 100-499 lines, ignoring generated files. release-note-label-needed labels Apr 3, 2016
@eparis
Copy link
Contributor

eparis commented Apr 3, 2016

should any of the zsh glue stuff move into the cobra repo, for others?

@sttts sttts force-pushed the sttts-kubectl-completion-cmd branch from 664f416 to 93998cb Compare April 3, 2016 19:35
@sttts
Copy link
Contributor Author

sttts commented Apr 3, 2016

Very good question. I reimplement a number of missing functions that are not part of the zsh completion environment to make it work, of course only as far as necessary for kubectl. This is not really a "just-works" situation for other programs based on cobra, depending especially on custom functions.

Let me check in detail.

@k8s-github-robot k8s-github-robot added kind/old-docs size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. and removed size/L Denotes a PR that changes 100-499 lines, ignoring generated files. labels Apr 3, 2016
@eparis eparis 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 3, 2016
@k8s-github-robot k8s-github-robot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Apr 14, 2016
@janetkuo
Copy link
Member

janetkuo commented May 6, 2016

@kubernetes/kubectl

@eparis
Copy link
Contributor

eparis commented May 9, 2016

@sttts are you going to rebase this? did we land all the pre-reqs?

@eparis eparis assigned eparis and unassigned thockin May 9, 2016
@sttts
Copy link
Contributor Author

sttts commented May 9, 2016

@eparis will rebase

@sttts sttts force-pushed the sttts-kubectl-completion-cmd branch from 93998cb to 715e5d3 Compare May 9, 2016 17:56
@k8s-github-robot k8s-github-robot added size/L Denotes a PR that changes 100-499 lines, ignoring generated files. and removed needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. labels May 9, 2016
@eparis
Copy link
Contributor

eparis commented May 9, 2016

@ingvagabund @liggitt @deads2k please CC anyone else you know of who might get bitten by this....

@eparis eparis added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label May 9, 2016
@smarterclayton
Copy link
Contributor

@fabianofranz

On Mon, May 9, 2016 at 2:53 PM, Kubernetes Bot notifications@github.com
wrote:

GCE e2e build/test failed for commit 715e5d3
715e5d3
.

Please reference the list of currently known flakes
https://github.com/kubernetes/kubernetes/issues?q=is:issue+label:kind/flake+is:open
when examining this failure. If you request a re-test, you must reference
the issue describing the flake.


You are receiving this because you are on a team that was mentioned.
Reply to this email directly or view it on GitHub
#23801 (comment)

@sttts
Copy link
Contributor Author

sttts commented May 25, 2016

Rebased.

@k8s-github-robot k8s-github-robot removed the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label May 25, 2016
@sttts sttts added this to the v1.3 milestone May 25, 2016
@sttts
Copy link
Contributor Author

sttts commented May 25, 2016

@k8s-bot test this issue: #25967

@k8s-github-robot k8s-github-robot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label May 27, 2016
@sttts sttts force-pushed the sttts-kubectl-completion-cmd branch from f208125 to 3020465 Compare May 27, 2016 07:02
@sttts sttts added lgtm "Looks good to me", indicates that a PR is ready to be merged. and removed lgtm "Looks good to me", indicates that a PR is ready to be merged. labels May 27, 2016
@k8s-github-robot k8s-github-robot removed the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label May 27, 2016
@sttts
Copy link
Contributor Author

sttts commented May 27, 2016

@k8s-bot test this issue: #26403

@sttts sttts force-pushed the sttts-kubectl-completion-cmd branch from 3020465 to 9e25d9f Compare May 30, 2016 05:29
@sttts sttts added lgtm "Looks good to me", indicates that a PR is ready to be merged. and removed lgtm "Looks good to me", indicates that a PR is ready to be merged. labels May 30, 2016
@k8s-github-robot
Copy link

@k8s-bot test this [submit-queue is verifying that this PR is safe to merge]

@k8s-bot
Copy link

k8s-bot commented May 30, 2016

GCE e2e build/test passed for commit 9e25d9f.

@k8s-github-robot
Copy link

Automatic merge from submit-queue

@k8s-github-robot k8s-github-robot merged commit 270e859 into kubernetes:master May 30, 2016
@sttts
Copy link
Contributor Author

sttts commented May 30, 2016

Amen.

@sttts sttts deleted the sttts-kubectl-completion-cmd branch May 30, 2016 08:31
xingzhou added a commit to xingzhou/official.kubernetes.github.io that referenced this pull request Aug 25, 2016
We have moved the shell script into `kubectl completion` command in [kubernetes#23801](kubernetes/kubernetes#23801), updated the bash completion usage in the doc.

Fixes kubernetes#1092
xingzhou added a commit to xingzhou/official.kubernetes.github.io that referenced this pull request Aug 29, 2016
We have moved the shell script into `kubectl completion` command in [kubernetes#23801](kubernetes/kubernetes#23801), updated the bash completion usage in the doc.

Fixes kubernetes#1092
xingzhou added a commit to xingzhou/official.kubernetes.github.io that referenced this pull request Aug 30, 2016
We have moved the shell script into `kubectl completion` command in [kubernetes#23801](kubernetes/kubernetes#23801), updated the bash completion usage in the doc.

Fixes kubernetes#1092
devin-donnelly pushed a commit to kubernetes/website that referenced this pull request Aug 30, 2016
We have moved the shell script into `kubectl completion` command in [#23801](kubernetes/kubernetes#23801), updated the bash completion usage in the doc.

Fixes #1092
openshift-publish-robot pushed a commit to openshift/kubernetes that referenced this pull request Sep 19, 2019
…ource-error-message

Bug 1743675: validations: for negative PVC storage size don't report "must be >= 0"

Origin-commit: 164fc5b8b6ff3a8f911bdf6c8ca94a7666de9e3d
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
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/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.

10 participants