kubernetes/pkg/kubectl/cmd
Kubernetes Submit Queue 551c4581c2 Merge pull request #48267 from superbrothers/clusterrole-flag-completion
Automatic merge from submit-queue. If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

Support completions for --clusterrole of kubectl create clusterrolebinding

**What this PR does / why we need it**:
This PR supports completion for --clusterrole of kubectl create clusterrolebinding.
```
$ kubectl create clusterrolebinding hoge --clusterrole <tab>
admin                                         system:controller:daemon-set-controller       system:controller:node-controller             system:controller:service-controller          system:kube-scheduler
cluster-admin                                 system:controller:deployment-controller       system:controller:persistent-volume-binder    system:controller:statefulset-controller      system:node
edit                                          system:controller:disruption-controller       system:controller:pod-garbage-collector       system:controller:ttl-controller              system:node-bootstrapper
system:auth-delegator                         system:controller:endpoint-controller         system:controller:replicaset-controller       system:discovery                              system:node-problem-detector
system:basic-user                             system:controller:generic-garbage-collector   system:controller:replication-controller      system:heapster                               system:node-proxier
system:controller:attachdetach-controller     system:controller:horizontal-pod-autoscaler   system:controller:resourcequota-controller    system:kube-aggregator                        system:persistent-volume-provisioner
system:controller:certificate-controller      system:controller:job-controller              system:controller:route-controller            system:kube-controller-manager                view
system:controller:cronjob-controller          system:controller:namespace-controller        system:controller:service-account-controller  system:kube-dns
```

**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**:

I feel that it is better to except system clusterroles from completion candidates. What do you think about it?

**Release note**:

```release-note
Support completion for --clusterrole of kubectl create clusterrolebinding
```
2017-10-03 22:04:00 -07:00
..
auth Merge pull request #52761 from yuexiao-wang/validate-message 2017-09-24 04:30:07 -07:00
config fix issue(11233)enhance kubectl config command 2017-09-14 17:14:42 +08:00
rollout add Local and Unstructured builder attributes 2017-09-05 11:57:00 -04:00
set Calculate patches for commands using input version 2017-09-29 13:03:18 -04:00
templates Use buildozer to delete licenses() rules except under third_party/ 2017-08-11 09:32:39 -07:00
testdata/edit Merge pull request #50205 from dixudx/fix_kubectl_edit_panic_nil_list 2017-08-11 19:44:04 -07:00
testing Remove swagger 1.2 validation 2017-10-03 08:18:21 -07:00
util Merge pull request #53232 from apelisse/remove-swagger-validation 2017-10-03 19:27:17 -07:00
alpha.go move i18n to kubectl/util 2017-08-16 12:27:36 -07:00
annotate_test.go fix parse pairs 2017-06-05 11:06:48 +08:00
annotate.go add Local and Unstructured builder attributes 2017-09-05 11:57:00 -04:00
apiversions.go move i18n to kubectl/util 2017-08-16 12:27:36 -07:00
apply_edit_last_applied.go enforce include-uninitialized in several kubectl commands 2017-08-31 16:30:56 +08:00
apply_set_last_applied.go add Local and Unstructured builder attributes 2017-09-05 11:57:00 -04:00
apply_test.go Protect against nil panic in apply 2017-07-18 12:55:34 -03:00
apply_view_last_applied.go add Local and Unstructured builder attributes 2017-09-05 11:57:00 -04:00
apply.go Remove swagger 1.2 validation 2017-10-03 08:18:21 -07:00
attach_test.go clean up: put test description in head to locate quickly 2017-05-19 02:04:59 +08:00
attach.go add Local and Unstructured builder attributes 2017-09-05 11:57:00 -04:00
autoscale.go add Local and Unstructured builder attributes 2017-09-05 11:57:00 -04:00
BUILD Rewrite kubectl explain to use openapi 2017-10-03 09:44:11 -07:00
certificates.go add Local and Unstructured builder attributes 2017-09-05 11:57:00 -04:00
clusterinfo_dump_test.go
clusterinfo_dump.go move i18n to kubectl/util 2017-08-16 12:27:36 -07:00
clusterinfo.go add Local and Unstructured builder attributes 2017-09-05 11:57:00 -04:00
cmd_test.go Move more printers to TablePrinter 2017-06-26 11:38:36 -04:00
cmd.go Merge pull request #48267 from superbrothers/clusterrole-flag-completion 2017-10-03 22:04:00 -07:00
completion.go Update help/example for kubectl completion 2017-08-18 14:29:42 -07:00
convert.go Remove swagger 1.2 validation 2017-10-03 08:18:21 -07:00
cp_test.go fix kubectl cp command error. 2017-09-11 17:22:13 +08:00
cp.go Merge pull request #52161 from CaoShuFeng/kubectl_cp 2017-09-23 10:26:52 -07:00
create_clusterrole_test.go validate nonResourceURL in create clusterrole 2017-08-18 13:03:38 +08:00
create_clusterrole.go Merge pull request #47171 from xilabao/validate-nonResourceURL-in-create-clusterrole 2017-08-25 12:31:07 -07:00
create_clusterrolebinding.go Merge pull request #48267 from superbrothers/clusterrole-flag-completion 2017-10-03 22:04:00 -07:00
create_configmap_test.go
create_configmap.go Add --append-hash flag to kubectl create configmap/secret 2017-08-28 14:17:47 -07:00
create_deployment_test.go kubectl/deployment: add BaseDeploymentGenerator to reduce duplication 2017-07-18 13:17:45 -07:00
create_deployment.go remove todo(#42787)Add fallback for cronjobs, and move some useful function to cmdutil 2017-09-04 18:41:19 +08:00
create_namespace_test.go
create_namespace.go move i18n to kubectl/util 2017-08-16 12:27:36 -07:00
create_pdb_test.go add test for kubectl create pdb 2017-05-26 17:38:26 +08:00
create_pdb.go move i18n to kubectl/util 2017-08-16 12:27:36 -07:00
create_quota_test.go Fix test not use test flags 2017-05-24 10:14:00 +08:00
create_quota.go move i18n to kubectl/util 2017-08-16 12:27:36 -07:00
create_role_test.go Merge pull request #46706 from CaoShuFeng/unit-create-role 2017-06-03 18:30:40 -07:00
create_role.go move i18n to kubectl/util 2017-08-16 12:27:36 -07:00
create_rolebinding_test.go Supplement unit tests to kubectl create rolebinding command. 2017-03-29 16:36:22 +08:00
create_rolebinding.go move i18n to kubectl/util 2017-08-16 12:27:36 -07:00
create_secret_test.go
create_secret.go Add --append-hash flag to kubectl create configmap/secret 2017-08-28 14:17:47 -07:00
create_service_test.go add test to cover more in kubectl create service 2017-05-16 18:45:38 +08:00
create_service.go move i18n to kubectl/util 2017-08-16 12:27:36 -07:00
create_serviceaccount_test.go
create_serviceaccount.go move i18n to kubectl/util 2017-08-16 12:27:36 -07:00
create_test.go
create.go Remove swagger 1.2 validation 2017-10-03 08:18:21 -07:00
delete_test.go enforce include-uninitialized in several kubectl commands 2017-08-31 16:30:56 +08:00
delete.go add Local and Unstructured builder attributes 2017-09-05 11:57:00 -04:00
describe_test.go
describe.go add Local and Unstructured builder attributes 2017-09-05 11:57:00 -04:00
drain_test.go kubectl: simplify deepcopy calls 2017-08-16 10:58:51 +02:00
drain.go add Local and Unstructured builder attributes 2017-09-05 11:57:00 -04:00
edit_test.go Detect missing steps in edit testcases 2017-08-10 11:01:01 -04:00
edit.go enforce include-uninitialized in several kubectl commands 2017-08-31 16:30:56 +08:00
exec_test.go move term to kubectl/util 2017-06-30 15:00:24 -07:00
exec.go move i18n to kubectl/util 2017-08-16 12:27:36 -07:00
explain.go Rewrite kubectl explain to use openapi 2017-10-03 09:44:11 -07:00
expose_test.go Refactor commands to use new factory method 2017-02-23 00:28:32 -05:00
expose.go add Local and Unstructured builder attributes 2017-09-05 11:57:00 -04:00
get_test.go add generic printer test of structured obj 2017-09-18 13:48:46 -04:00
get.go Merge pull request #52051 from juanvallejo/jvallejo/acknowledge-show-all-kubectl-get-watch 2017-09-23 13:40:53 -07:00
help.go move i18n to kubectl/util 2017-08-16 12:27:36 -07:00
label_test.go fix parse pairs 2017-06-05 11:06:48 +08:00
label.go Merge pull request #51971 from juanvallejo/jvallejo/add-list-option-to-kubectl-label 2017-09-23 18:49:00 -07:00
logs_test.go
logs.go add Local and Unstructured builder attributes 2017-09-05 11:57:00 -04:00
options.go move i18n to kubectl/util 2017-08-16 12:27:36 -07:00
patch_test.go add/update tests 2017-09-14 16:23:23 -04:00
patch.go Merge pull request #50532 from steveperry-53/kubectl-patch 2017-09-27 00:52:53 -07:00
plugin_test.go kubectl plugins have access config, global flags and environment 2017-05-19 19:17:43 -03:00
plugin.go move i18n to kubectl/util 2017-08-16 12:27:36 -07:00
portforward_test.go kubectl/cmd: remove a bunch of unused parameters 2017-04-04 10:36:30 +01:00
portforward.go Merge pull request #50229 from tcharding/kubectl-portforward 2017-08-23 03:36:03 -07:00
proxy.go move i18n to kubectl/util 2017-08-16 12:27:36 -07:00
replace_test.go
replace.go Remove swagger 1.2 validation 2017-10-03 08:18:21 -07:00
rollingupdate_test.go small change to clear 2017-05-11 20:09:31 +08:00
rollingupdate.go Remove swagger 1.2 validation 2017-10-03 08:18:21 -07:00
run_test.go move i18n to kubectl/util 2017-08-16 12:27:36 -07:00
run.go Merge pull request #50890 from zjj2wry/fix-todo-fallback 2017-09-23 16:19:00 -07:00
scale.go Merge pull request #51021 from zjj2wry/scale-selector-all 2017-09-29 12:38:17 -07:00
taint_test.go kubectl: simplify deepcopy calls 2017-08-16 10:58:51 +02:00
taint.go add Local and Unstructured builder attributes 2017-09-05 11:57:00 -04:00
top_node_test.go add tests 2017-08-17 18:08:26 -04:00
top_node.go Merge pull request #50816 from YuxiJin-tobeyjin/errdefine 2017-08-24 21:51:03 -07:00
top_pod_test.go add tests 2017-08-17 18:08:26 -04:00
top_pod.go Merge pull request #50620 from juanvallejo/jvallejo/update-kubectl-top-validation 2017-08-21 08:26:23 -07:00
top_test.go remove duplicated import and wrong alias name of api package 2017-07-25 10:04:25 +08:00
top.go Merge pull request #50620 from juanvallejo/jvallejo/update-kubectl-top-validation 2017-08-21 08:26:23 -07:00
version.go move i18n to kubectl/util 2017-08-16 12:27:36 -07:00