k3s/hack
Kubernetes Submit Queue 229d2df48a
Merge pull request #42873 from xilabao/add-apiresources-command
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>.

add kubectl api-resources command

**What this PR does / why we need it**:
As the RBAC role need to be related to resources. I think we can use the command to get the supported resources. 

```
# ./cluster/kubectl.sh api-resources   
NAME                                  SHORTNAMES   APIGROUP                       NAMESPACED   KIND
bindings                                                                          true         Binding
componentstatuses                     cs                                          false        ComponentStatus
configmaps                            cm                                          true         ConfigMap
endpoints                             ep                                          true         Endpoints
events                                ev                                          true         Event
limitranges                           limits                                      true         LimitRange
namespaces                            ns                                          false        Namespace
nodes                                 no                                          false        Node
persistentvolumeclaims                pvc                                         true         PersistentVolumeClaim
persistentvolumes                     pv                                          false        PersistentVolume
pods                                  po                                          true         Pod
podtemplates                                                                      true         PodTemplate
replicationcontrollers                rc                                          true         ReplicationController
resourcequotas                        quota                                       true         ResourceQuota
secrets                                                                           true         Secret
serviceaccounts                       sa                                          true         ServiceAccount
services                              svc                                         true         Service
externaladmissionhookconfigurations                admissionregistration.k8s.io   false        ExternalAdmissionHookConfiguration
initializerconfigurations                          admissionregistration.k8s.io   false        InitializerConfiguration
customresourcedefinitions             crd          apiextensions.k8s.io           false        CustomResourceDefinition
apiservices                                        apiregistration.k8s.io         false        APIService
controllerrevisions                                apps                           true         ControllerRevision
daemonsets                            ds           apps                           true         DaemonSet
deployments                           deploy       apps                           true         Deployment
replicasets                           rs           apps                           true         ReplicaSet
statefulsets                          sts          apps                           true         StatefulSet
tokenreviews                                       authentication.k8s.io          false        TokenReview
localsubjectaccessreviews                          authorization.k8s.io           true         LocalSubjectAccessReview
selfsubjectaccessreviews                           authorization.k8s.io           false        SelfSubjectAccessReview
subjectaccessreviews                               authorization.k8s.io           false        SubjectAccessReview
horizontalpodautoscalers              hpa          autoscaling                    true         HorizontalPodAutoscaler
jobs                                               batch                          true         Job
certificatesigningrequests            csr          certificates.k8s.io            false        CertificateSigningRequest
daemonsets                            ds           extensions                     true         DaemonSet
deployments                           deploy       extensions                     true         Deployment
ingresses                             ing          extensions                     true         Ingress
networkpolicies                       netpol       extensions                     true         NetworkPolicy
podsecuritypolicies                   psp          extensions                     false        PodSecurityPolicy
replicasets                           rs           extensions                     true         ReplicaSet
networkpolicies                       netpol       networking.k8s.io              true         NetworkPolicy
poddisruptionbudgets                  pdb          policy                         true         PodDisruptionBudget
clusterrolebindings                                rbac.authorization.k8s.io      false        ClusterRoleBinding
clusterroles                                       rbac.authorization.k8s.io      false        ClusterRole
rolebindings                                       rbac.authorization.k8s.io      true         RoleBinding
roles                                              rbac.authorization.k8s.io      true         Role
podpresets                                         settings.k8s.io                true         PodPreset
storageclasses                        sc           storage.k8s.io                 false        StorageClass
```
**Which issue this PR fixes**: fixes https://github.com/kubernetes/kubernetes/issues/42932

**Special notes for your reviewer**:

**Release note**:

```release-note
add kubectl api-resources command to discovery of resources
```
2018-04-03 14:35:09 -07:00
..
boilerplate Merge pull request #59172 from fisherxu/removeyear 2018-03-21 12:44:37 -07:00
cmd/teststale Autogenerated: hack/update-bazel.sh 2018-02-16 13:43:01 -08:00
e2e-internal Remove all traces of federation 2017-10-26 13:37:37 -07:00
gen-swagger-doc Switch to k8s.gcr.io vanity domain 2018-02-07 21:14:19 -08:00
jenkins Only install etcd for verify tests that need it. 2018-02-28 22:05:52 -08:00
lib Merge pull request #57600 from thockin/vendor-gazelle 2018-04-02 12:13:06 -07:00
make-rules Merge pull request #42873 from xilabao/add-apiresources-command 2018-04-03 14:35:09 -07:00
testdata update -o name format to kind.group/name 2018-02-15 10:33:06 -05:00
verify-flags Add multi-vc configuration for e2e tests 2018-01-18 15:29:27 -08:00
.golint_failures Delete in-tree support for NVIDIA GPUs. 2018-04-02 20:17:01 -07:00
.spelling_failures add spelling checking script 2018-02-23 09:33:14 +08:00
BUILD Autogenerated: hack/update-bazel.sh 2018-02-16 13:43:01 -08:00
OWNERS Add myself for sig-cli related stuff as approver 2018-03-16 16:22:46 +01:00
autogenerated_placeholder.txt
benchmark-go.sh
build-cross.sh
build-go.sh
build-ui.sh Merge pull request #61098 from ipuustin/shell-bugfix6 2018-03-21 22:39:12 -07:00
cherry_pick_pull.sh Add parent PR title to cherry-picked PR title 2017-11-25 13:36:13 +08:00
dev-build-and-push.sh
dev-build-and-up.sh
dev-push-hyperkube.sh
e2e-node-test.sh Fix typo in e2e-node-test.sh 2017-09-19 18:10:21 +05:30
e2e.go translate hack/e2e.go -v to --verbose-commands 2018-03-07 11:27:56 -08:00
e2e_test.go translate hack/e2e.go -v to --verbose-commands 2018-03-07 11:27:56 -08:00
generate-bindata.sh cluster: move logging library to hack/ 2018-01-13 16:37:50 -08:00
generate-docs.sh Remove all traces of federation 2017-10-26 13:37:37 -07:00
get-build.sh
ginkgo-e2e.sh cluster: remove unused functions 2018-02-01 07:23:50 -08:00
godep-restore.sh Remove unneeded code 2018-01-30 09:29:51 -08:00
godep-save.sh Vendor kazel 2018-03-29 17:01:32 -07:00
grab-profiles.sh remove deprecated /proxy paths 2018-02-20 14:42:19 -08:00
import-restrictions.yaml Expose single annotation/label via downward API 2017-11-21 19:21:10 -08:00
install-etcd.sh
list-feature-tests.sh Fix list-features script 2017-08-27 22:20:04 -04:00
local-up-cluster.sh Merge pull request #61432 from filbranden/killrkt1 2018-03-29 11:46:19 -07:00
print-workspace-status.sh bazel: support using SOURCE_DATE_EPOCH to override date 2018-02-08 21:12:03 -08:00
run-in-gopath.sh
test-go.sh
test-integration.sh
test-update-storage-objects.sh set default enabled admission plugins by official document 2018-02-22 11:02:02 +08:00
update-all.sh Force use of Makefile for update 2018-01-22 15:11:16 -08:00
update-api-reference-docs.sh
update-bazel.sh Vendor kazel 2018-03-29 17:01:32 -07:00
update-cloudprovider-gce.sh Fix lint and bazel 2018-01-09 23:09:08 -08:00
update-codegen.sh add boilerplate.generatego.txt and let all code-generators use it 2018-03-08 17:52:44 +08:00
update-generated-device-plugin-dockerized.sh Create pkg/kubelet/apis/deviceplugin/v1beta1 directory. 2018-02-08 17:04:43 -08:00
update-generated-device-plugin.sh Added script to generate the Device Plugin API 2017-08-15 14:59:42 -07:00
update-generated-docs.sh Remove all traces of federation 2017-10-26 13:37:37 -07:00
update-generated-kms-dockerized.sh add boilerplate.generatego.txt and let all code-generators use it 2018-03-08 17:52:44 +08:00
update-generated-kms.sh Add generated script for kms api pb file 2018-02-08 01:00:38 +00:00
update-generated-protobuf-dockerized.sh add boilerplate.generatego.txt and let all code-generators use it 2018-03-08 17:52:44 +08:00
update-generated-protobuf.sh
update-generated-runtime-dockerized.sh add boilerplate.generatego.txt and let all code-generators use it 2018-03-08 17:52:44 +08:00
update-generated-runtime.sh
update-generated-swagger-docs.sh Promote v1alpha1 meta to v1beta1 2018-02-02 14:00:45 -05:00
update-godep-licenses.sh update-godep-licenses.sh: various fixes and cleanups. 2018-03-23 15:38:20 +02:00
update-gofmt.sh
update-openapi-spec.sh
update-staging-godeps-dockerized.sh Clean up godep scripts to be self-contained 2017-09-29 15:16:03 -07:00
update-staging-godeps.sh Dockerize update-staging-godeps 2017-07-25 12:26:57 -07:00
update-swagger-spec.sh Merge pull request #58303 from php-coder/fix_verify-swagger-spec_sript 2018-01-17 02:43:58 -08:00
update-translations.sh update-translations.sh: use kube::util::ensure-temp-dir instead of static path. 2018-03-16 10:11:48 +02:00
update_owners.py remove some not used imports from python codes 2018-03-07 17:43:47 +08:00
verify-all.sh
verify-api-groups.sh Fixup after k8s.io/{kube-gen -> code-generator} rename 2017-08-17 17:55:12 +02:00
verify-api-reference-docs.sh Ignore OWNERS files in hack/verify-api-reference-docs.sh 2017-10-18 11:15:08 -07:00
verify-bazel.sh Vendor gazelle 2018-03-29 17:01:30 -07:00
verify-boilerplate.sh Route verify-boilerplate output to stderr 2018-02-07 21:41:31 -08:00
verify-cli-conventions.sh verify-cli-conventions.sh: use $(..) instead of `..`. 2018-03-23 15:37:03 +02:00
verify-cloudprovider-gce.sh Fix lint and bazel 2018-01-09 23:09:08 -08:00
verify-codegen.sh Add sample CustomResourceDefinition controller 2017-10-19 00:21:57 +01:00
verify-description.sh pkg/api/unversioned related cleanup 2018-03-13 17:20:16 +08:00
verify-flags-underscore.py remove some not used imports from python codes 2018-03-07 17:43:47 +08:00
verify-generated-device-plugin.sh Create pkg/kubelet/apis/deviceplugin/v1beta1 directory. 2018-02-08 17:04:43 -08:00
verify-generated-docs.sh Remove all traces of federation 2017-10-26 13:37:37 -07:00
verify-generated-files-remake.sh Add debugging to the codegen process 2017-08-25 14:08:42 -07:00
verify-generated-kms.sh Add verify script for kms generated file 2018-02-08 01:29:56 +00:00
verify-generated-protobuf.sh Treat staging repos as authoritative for all files 2018-01-09 15:18:27 -08:00
verify-generated-runtime.sh Increment CRI version from v1alpha1 to v1alpha2 2018-02-07 09:06:26 +01:00
verify-generated-swagger-docs.sh Ignore .import-restrictions when checking against generated docs 2017-10-13 07:09:38 -04:00
verify-godep-licenses.sh Route verify-godep-licenses output to stderr 2018-02-07 21:45:02 -08:00
verify-godeps.sh Vendor gazelle 2018-03-29 17:01:30 -07:00
verify-gofmt.sh Route verify-gofmt output to stderr 2018-02-07 21:39:49 -08:00
verify-golint.sh Invert .linted_packages into .golint_failures. 2017-07-17 14:37:40 -07:00
verify-govet.sh
verify-import-boss.sh Fixup after k8s.io/{kube-gen -> code-generator} rename 2017-08-17 17:55:12 +02:00
verify-imports.sh import-verifier: use yaml for inline comments 2017-10-25 16:53:26 +02:00
verify-linkcheck.sh
verify-no-vendor-cycles.sh Bugfix: verify-no-vendor-cycles.sh detects wrong cycles 2017-08-01 21:09:53 -07:00
verify-openapi-spec.sh Only install etcd for verify tests that need it. 2018-02-28 22:05:52 -08:00
verify-pkg-names.sh remove reference to v1alpha1 2017-11-21 13:00:40 -08:00
verify-readonly-packages.sh
verify-spelling.sh Vendor gazelle 2018-03-29 17:01:30 -07:00
verify-staging-godeps.sh Add in godeps verification for hack/lib/ and build/ 2018-01-26 13:29:35 -08:00
verify-swagger-spec.sh Only install etcd for verify tests that need it. 2018-02-28 22:05:52 -08:00
verify-symbols.sh
verify-test-images.sh
verify-test-owners.sh
verify-typecheck.sh Ensure generated files are present before typechecking. 2018-02-27 14:31:57 -08:00