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

Make kubectl bash-completion namespace and resource alias aware #23262

Merged

Conversation

@sttts
Copy link
Contributor

sttts commented Mar 20, 2016

kubectl-completion

  • filter resource listing by --namespace flag given before in the command line
$ kubectl get pod --namespace=kube-system <tab><tab>
kube-dns-v9-2wuzj   kube-dns-v9-llqxa
  • add completion of --namespace
$ kubectl get pod --namespace=<tab><tab>
[*]         default      ingress      kube-system
  • add support for plural nouns and aliases like rc
@k8s-github-robot
Copy link
Contributor

k8s-github-robot commented Mar 20, 2016

Labelling this PR as size/L

local ret two_word_ns
ret=""
two_word_ns=false
for w in ${words[@]}; do

This comment has been minimized.

@eparis

eparis Mar 20, 2016 Member

${words[@]} should be in quotes.

This comment has been minimized.

@sttts

sttts Mar 21, 2016 Author Contributor

Fixed.

@k8s-bot
Copy link

k8s-bot commented Mar 20, 2016

GCE e2e build/test passed for commit 98afa1f.

@sttts sttts force-pushed the sttts:sttts-bash-completion-flag-equal branch 2 times, most recently from 5737184 to b1ea0e3 Mar 21, 2016
@k8s-bot
Copy link

k8s-bot commented Mar 21, 2016

GCE e2e build/test passed for commit 5737184.

@k8s-bot
Copy link

k8s-bot commented Mar 21, 2016

GCE e2e build/test passed for commit b1ea0e3.

@sttts sttts force-pushed the sttts:sttts-bash-completion-flag-equal branch from b1ea0e3 to d065019 Mar 22, 2016
@sttts sttts changed the title WIP: Improve shell completion Improve shell completion Mar 22, 2016
@k8s-bot
Copy link

k8s-bot commented Mar 22, 2016

GCE e2e build/test passed for commit d065019.

@sttts sttts force-pushed the sttts:sttts-bash-completion-flag-equal branch from d065019 to 7272bfd Mar 22, 2016
@k8s-bot
Copy link

k8s-bot commented Mar 22, 2016

GCE e2e build/test failed for commit 7272bfd.

Please reference the list of currently known flakes when examining this failure. If you request a re-test, you must reference the issue describing the flake.

@sttts sttts force-pushed the sttts:sttts-bash-completion-flag-equal branch from 7272bfd to 3c19b65 Mar 22, 2016
@k8s-bot
Copy link

k8s-bot commented Mar 22, 2016

GCE e2e build/test failed for commit 3c19b65.

Please reference the list of currently known flakes when examining this failure. If you request a re-test, you must reference the issue describing the flake.

@sttts sttts force-pushed the sttts:sttts-bash-completion-flag-equal branch from 3c19b65 to a43e584 Mar 22, 2016
@k8s-bot
Copy link

k8s-bot commented Mar 22, 2016

GCE e2e build/test passed for commit a43e584.

@sttts sttts force-pushed the sttts:sttts-bash-completion-flag-equal branch from a43e584 to fb3ca8d Mar 22, 2016
@k8s-bot
Copy link

k8s-bot commented Mar 22, 2016

GCE e2e build/test passed for commit fb3ca8d.

@@ -135,6 +166,8 @@ __handle_noun()

if __contains_word "${words[c]}" "${must_have_one_noun[@]}"; then
must_have_one_noun=()
elif __contains_word "${words[c]%!s(MISSING)}" "${must_have_one_noun[@]}"; then

This comment has been minimized.

@eparis

eparis Mar 22, 2016 Member

%!s(MISSING) ? looks like some bad golang somewhere...

This comment has been minimized.

@sttts

sttts Mar 22, 2016 Author Contributor

@sttts sttts force-pushed the sttts:sttts-bash-completion-flag-equal branch from fb3ca8d to c9a749c Mar 22, 2016
@k8s-bot
Copy link

k8s-bot commented Mar 22, 2016

GCE e2e build/test passed for commit c9a749c.

@sttts sttts force-pushed the sttts:sttts-bash-completion-flag-equal branch from c9a749c to 6c36665 Mar 22, 2016
@sttts
Copy link
Contributor Author

sttts commented Mar 22, 2016

hack/update-godep-licenses.sh doesn't like me.

@k8s-bot
Copy link

k8s-bot commented Mar 22, 2016

GCE e2e build/test passed for commit 6c36665.

@sttts
Copy link
Contributor Author

sttts commented Mar 22, 2016

bash4'ism in that script.

@sttts sttts force-pushed the sttts:sttts-bash-completion-flag-equal branch from 6c36665 to 4ca3684 Mar 22, 2016
@k8s-bot
Copy link

k8s-bot commented Mar 22, 2016

GCE e2e build/test passed for commit 4ca3684.

sttts added 2 commits Mar 20, 2016
- add namespace filtering to bash completion
- add --namespace flag bash completion
- add bash completion noun aliases
- adapt to new cobra package structure
@sttts sttts force-pushed the sttts:sttts-bash-completion-flag-equal branch from 34ccd3c to f832aaf Apr 3, 2016
@sttts sttts changed the title WIP: Improve shell completion Make kubectl bash-completion namespace aware and add resource aliases Apr 3, 2016
@sttts
Copy link
Contributor Author

sttts commented Apr 3, 2016

Updated to latest cobra master with shellcheck fixes.

@k8s-bot
Copy link

k8s-bot commented Apr 3, 2016

GCE e2e build/test passed for commit f832aaf.

@sttts sttts changed the title Make kubectl bash-completion namespace aware and add resource aliases Make kubectl bash-completion namespace and resource alias aware Apr 3, 2016
@k8s-teamcity-mesosphere

This comment has been minimized.

Copy link

k8s-teamcity-mesosphere commented on f832aaf Apr 3, 2016

TeamCity OSS :: Kubernetes Mesos :: 4 - Smoke Tests Build 20474 outcome was SUCCESS
Summary: Tests passed: 1, ignored: 267 Build time: 00:11:34

@k8s-github-robot
Copy link
Contributor

k8s-github-robot commented Apr 5, 2016

@k8s-bot test this

Tests are more than 48 hours old. Re-running tests.

@k8s-bot
Copy link

k8s-bot commented Apr 5, 2016

GCE e2e build/test passed for commit f832aaf.

@k8s-github-robot
Copy link
Contributor

k8s-github-robot commented Apr 5, 2016

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

@k8s-bot
Copy link

k8s-bot commented Apr 5, 2016

GCE e2e build/test failed for commit f832aaf.

Please reference the list of currently known flakes when examining this failure. If you request a re-test, you must reference the issue describing the flake.

@sttts
Copy link
Contributor Author

sttts commented Apr 12, 2016

@k8s-bot test this please flake: #21367

@k8s-bot
Copy link

k8s-bot commented Apr 12, 2016

GCE e2e build/test passed for commit f832aaf.

@k8s-github-robot
Copy link
Contributor

k8s-github-robot commented Apr 14, 2016

@k8s-bot test this

Tests are more than 48 hours old. Re-running tests.

@k8s-bot
Copy link

k8s-bot commented Apr 14, 2016

GCE e2e build/test passed for commit f832aaf.

@k8s-github-robot
Copy link
Contributor

k8s-github-robot commented Apr 14, 2016

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

@k8s-bot
Copy link

k8s-bot commented Apr 14, 2016

GCE e2e build/test passed for commit f832aaf.

@k8s-github-robot
Copy link
Contributor

k8s-github-robot commented Apr 14, 2016

Automatic merge from submit-queue

@k8s-github-robot k8s-github-robot merged commit e121b56 into kubernetes:master Apr 14, 2016
5 of 6 checks passed
5 of 6 checks passed
Submit Queue Github CI tests are not green.
Details
Jenkins GCE Node e2e Build finished.
Details
Jenkins GCE e2e 277 tests run, 112 skipped, 0 failed.
Details
Jenkins unit/integration 5888 tests run, 18 skipped, 0 failed.
Details
cla/google All necessary CLAs are signed
continuous-integration/travis-ci/pr The Travis CI build passed
Details
openshift-publish-robot pushed a commit to openshift/kubernetes that referenced this pull request Jun 25, 2019
…ete-loop-fix

Bug 1712528 - oc delete of a static pod results in multiple attempts to re-create the mirror pod before succeeding

Origin-commit: e4b9b95d5b5eb0108efa67619b42c7b3f1609074
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

6 participants
You can’t perform that action at this time.