k3s/pkg
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
..
api remove unused pkg unversioned 2018-03-13 15:06:38 +08:00
apis Delete in-tree support for NVIDIA GPUs. 2018-04-02 20:17:01 -07:00
auth Autogenerated: hack/update-bazel.sh 2018-02-16 13:43:01 -08:00
capabilities Autogenerated: hack/update-bazel.sh 2018-02-16 13:43:01 -08:00
client Set leader-elect for kube-scheduler to true 2018-03-30 10:52:01 -04:00
cloudprovider Add support for multiple certificates to targetproxy 2018-04-02 23:34:08 -07:00
controller Update gofmt for go1.10 2018-04-02 17:44:04 -07:00
credentialprovider Autogenerated: hack/update-bazel.sh 2018-02-16 13:43:01 -08:00
features Delete in-tree support for NVIDIA GPUs. 2018-04-02 20:17:01 -07:00
fieldpath Autogenerated: hack/update-bazel.sh 2018-02-16 13:43:01 -08:00
generated Vendor kazel 2018-03-29 17:01:32 -07:00
kubeapiserver Merge pull request #60100 from mtaufen/node-authz-nodeconfigsource 2018-03-29 17:37:18 -07:00
kubectl Merge pull request #42873 from xilabao/add-apiresources-command 2018-04-03 14:35:09 -07:00
kubelet Merge pull request #61498 from mindprince/delete-in-tree-gpu 2018-04-03 02:02:04 -07:00
kubemark add nodeport-addresses flag for kube-proxy 2018-02-26 23:48:46 +08:00
master remove kube-apiserver option that is always force to true 2018-04-02 12:19:34 -04:00
printers Restore show-kind function when printing multiple kinds 2018-04-01 00:24:25 -04:00
probe Autogenerated: hack/update-bazel.sh 2018-02-16 13:43:01 -08:00
proxy Updated README for ipvs. 2018-04-01 22:28:43 +08:00
quota Resources prefixed with *kubernetes.io/ should remain unscheduled if they are not exposed on the node. 2018-03-28 17:24:30 -07:00
registry Merge pull request #60519 from bsalamat/auto_prio_class 2018-03-26 23:20:05 -07:00
routes Remove /ui/ redirect 2018-02-12 10:54:33 -05:00
scheduler Delete in-tree support for NVIDIA GPUs. 2018-04-02 20:17:01 -07:00
security Update gofmt for go1.10 2018-04-02 17:44:04 -07:00
securitycontext remove unused code in securitycontext 2018-03-29 23:32:48 -07:00
serviceaccount implement token authenticator for new id tokens 2018-02-27 17:20:46 -08:00
ssh Autogenerated: hack/update-bazel.sh 2018-02-16 13:43:01 -08:00
util Merge pull request #60073 from justaugustus/int-to-int32ptr 2018-04-02 16:22:28 -07:00
version Require boilerplate on Bazel Skylark source files 2018-02-16 13:44:04 -08:00
volume Merge pull request #62012 from andyzhangx/local-windows-fix 2018-04-03 11:33:13 -07:00
watch/json
windows/service Add support for binaries to run as Windows services 2018-03-07 00:51:36 +01:00
.import-restrictions
BUILD pkg/api/unversioned related cleanup 2018-03-13 17:20:16 +08:00
OWNERS