From 3507bf814f428a4d717876bb966339e6c1d012ac Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lucas=20K=C3=A4ldstr=C3=B6m?= Date: Fri, 25 Mar 2016 23:28:52 +0200 Subject: [PATCH] Add sa as a shorthand for serviceaccounts --- docs/man/man1/kubectl-describe.1 | 2 +- docs/man/man1/kubectl-explain.1 | 2 +- docs/man/man1/kubectl-get.1 | 2 +- docs/user-guide/kubectl/kubectl_describe.md | 4 ++-- docs/user-guide/kubectl/kubectl_explain.md | 4 ++-- docs/user-guide/kubectl/kubectl_get.md | 4 ++-- pkg/kubectl/cmd/cmd.go | 2 +- pkg/kubectl/kubectl.go | 3 ++- 8 files changed, 12 insertions(+), 11 deletions(-) diff --git a/docs/man/man1/kubectl-describe.1 b/docs/man/man1/kubectl-describe.1 index 1bbf7130dcc..9a2a912de91 100644 --- a/docs/man/man1/kubectl-describe.1 +++ b/docs/man/man1/kubectl-describe.1 @@ -30,7 +30,7 @@ exists, it will output details for every resource that has a name prefixed with Possible resource types include (case insensitive): pods (po), services (svc), deployments, replicasets (rs), replicationcontrollers (rc), nodes (no), events (ev), limitranges (limits), persistentvolumes (pv), persistentvolumeclaims (pvc), resourcequotas (quota), namespaces (ns), -serviceaccounts, ingresses (ing), horizontalpodautoscalers (hpa), daemonsets (ds), configmaps, +serviceaccounts (sa), ingresses (ing), horizontalpodautoscalers (hpa), daemonsets (ds), configmaps, componentstatuses (cs), endpoints (ep), and secrets. diff --git a/docs/man/man1/kubectl-explain.1 b/docs/man/man1/kubectl-explain.1 index fb013367298..4c7b387b37a 100644 --- a/docs/man/man1/kubectl-explain.1 +++ b/docs/man/man1/kubectl-explain.1 @@ -19,7 +19,7 @@ Documentation of resources. Possible resource types include (case insensitive): pods (po), services (svc), deployments, replicasets (rs), replicationcontrollers (rc), nodes (no), events (ev), limitranges (limits), persistentvolumes (pv), persistentvolumeclaims (pvc), resourcequotas (quota), namespaces (ns), -serviceaccounts, ingresses (ing), horizontalpodautoscalers (hpa), daemonsets (ds), configmaps, +serviceaccounts (sa), ingresses (ing), horizontalpodautoscalers (hpa), daemonsets (ds), configmaps, componentstatuses (cs), endpoints (ep), and secrets. diff --git a/docs/man/man1/kubectl-get.1 b/docs/man/man1/kubectl-get.1 index 2580bceba77..24bc3999a45 100644 --- a/docs/man/man1/kubectl-get.1 +++ b/docs/man/man1/kubectl-get.1 @@ -19,7 +19,7 @@ Display one or many resources. Possible resource types include (case insensitive): pods (po), services (svc), deployments, replicasets (rs), replicationcontrollers (rc), nodes (no), events (ev), limitranges (limits), persistentvolumes (pv), persistentvolumeclaims (pvc), resourcequotas (quota), namespaces (ns), -serviceaccounts, ingresses (ing), horizontalpodautoscalers (hpa), daemonsets (ds), configmaps, +serviceaccounts (sa), ingresses (ing), horizontalpodautoscalers (hpa), daemonsets (ds), configmaps, componentstatuses (cs), endpoints (ep), and secrets. .PP diff --git a/docs/user-guide/kubectl/kubectl_describe.md b/docs/user-guide/kubectl/kubectl_describe.md index 9ba3845b789..4438aba4ca4 100644 --- a/docs/user-guide/kubectl/kubectl_describe.md +++ b/docs/user-guide/kubectl/kubectl_describe.md @@ -52,7 +52,7 @@ exists, it will output details for every resource that has a name prefixed with Possible resource types include (case insensitive): pods (po), services (svc), deployments, replicasets (rs), replicationcontrollers (rc), nodes (no), events (ev), limitranges (limits), persistentvolumes (pv), persistentvolumeclaims (pvc), resourcequotas (quota), namespaces (ns), -serviceaccounts, ingresses (ing), horizontalpodautoscalers (hpa), daemonsets (ds), configmaps, +serviceaccounts (sa), ingresses (ing), horizontalpodautoscalers (hpa), daemonsets (ds), configmaps, componentstatuses (cs), endpoints (ep), and secrets. ``` @@ -120,7 +120,7 @@ kubectl describe pods frontend * [kubectl](kubectl.md) - kubectl controls the Kubernetes cluster manager -###### Auto generated by spf13/cobra on 22-Mar-2016 +###### Auto generated by spf13/cobra on 25-Mar-2016 [![Analytics](https://kubernetes-site.appspot.com/UA-36037335-10/GitHub/docs/user-guide/kubectl/kubectl_describe.md?pixel)]() diff --git a/docs/user-guide/kubectl/kubectl_explain.md b/docs/user-guide/kubectl/kubectl_explain.md index 4b05cc70563..4c76a8001cc 100644 --- a/docs/user-guide/kubectl/kubectl_explain.md +++ b/docs/user-guide/kubectl/kubectl_explain.md @@ -44,7 +44,7 @@ Documentation of resources. Possible resource types include (case insensitive): pods (po), services (svc), deployments, replicasets (rs), replicationcontrollers (rc), nodes (no), events (ev), limitranges (limits), persistentvolumes (pv), persistentvolumeclaims (pvc), resourcequotas (quota), namespaces (ns), -serviceaccounts, ingresses (ing), horizontalpodautoscalers (hpa), daemonsets (ds), configmaps, +serviceaccounts (sa), ingresses (ing), horizontalpodautoscalers (hpa), daemonsets (ds), configmaps, componentstatuses (cs), endpoints (ep), and secrets. ``` @@ -98,7 +98,7 @@ kubectl explain pods.spec.containers * [kubectl](kubectl.md) - kubectl controls the Kubernetes cluster manager -###### Auto generated by spf13/cobra on 22-Mar-2016 +###### Auto generated by spf13/cobra on 25-Mar-2016 [![Analytics](https://kubernetes-site.appspot.com/UA-36037335-10/GitHub/docs/user-guide/kubectl/kubectl_explain.md?pixel)]() diff --git a/docs/user-guide/kubectl/kubectl_get.md b/docs/user-guide/kubectl/kubectl_get.md index 0d3910cebfa..c5fd9e4a19a 100644 --- a/docs/user-guide/kubectl/kubectl_get.md +++ b/docs/user-guide/kubectl/kubectl_get.md @@ -44,7 +44,7 @@ Display one or many resources. Possible resource types include (case insensitive): pods (po), services (svc), deployments, replicasets (rs), replicationcontrollers (rc), nodes (no), events (ev), limitranges (limits), persistentvolumes (pv), persistentvolumeclaims (pvc), resourcequotas (quota), namespaces (ns), -serviceaccounts, ingresses (ing), horizontalpodautoscalers (hpa), daemonsets (ds), configmaps, +serviceaccounts (sa), ingresses (ing), horizontalpodautoscalers (hpa), daemonsets (ds), configmaps, componentstatuses (cs), endpoints (ep), and secrets. By specifying the output as 'template' and providing a Go template as the value @@ -132,7 +132,7 @@ kubectl get rc/web service/frontend pods/web-pod-13je7 * [kubectl](kubectl.md) - kubectl controls the Kubernetes cluster manager -###### Auto generated by spf13/cobra on 22-Mar-2016 +###### Auto generated by spf13/cobra on 25-Mar-2016 [![Analytics](https://kubernetes-site.appspot.com/UA-36037335-10/GitHub/docs/user-guide/kubectl/kubectl_get.md?pixel)]() diff --git a/pkg/kubectl/cmd/cmd.go b/pkg/kubectl/cmd/cmd.go index 22828844800..0c47e3b5a43 100644 --- a/pkg/kubectl/cmd/cmd.go +++ b/pkg/kubectl/cmd/cmd.go @@ -134,7 +134,7 @@ __custom_func() { * replicasets (aka 'rs') * replicationcontrollers (aka 'rc') * secrets - * serviceaccounts + * serviceaccounts (aka 'sa') * services (aka 'svc') ` ) diff --git a/pkg/kubectl/kubectl.go b/pkg/kubectl/kubectl.go index 39cd1681a2d..b0c3861e5a6 100644 --- a/pkg/kubectl/kubectl.go +++ b/pkg/kubectl/kubectl.go @@ -34,7 +34,7 @@ const ( PossibleResourceTypes = `Possible resource types include (case insensitive): pods (po), services (svc), deployments, replicasets (rs), replicationcontrollers (rc), nodes (no), events (ev), limitranges (limits), persistentvolumes (pv), persistentvolumeclaims (pvc), resourcequotas (quota), namespaces (ns), -serviceaccounts, ingresses (ing), horizontalpodautoscalers (hpa), daemonsets (ds), configmaps, +serviceaccounts (sa), ingresses (ing), horizontalpodautoscalers (hpa), daemonsets (ds), configmaps, componentstatuses (cs), endpoints (ep), and secrets.` ) @@ -138,6 +138,7 @@ var shortForms = map[string]string{ "quota": "resourcequotas", "rc": "replicationcontrollers", "rs": "replicasets", + "sa": "serviceaccounts", "svc": "services", }