Skip to content

Commit

Permalink
Add "deploy" abbrev for deployments to kubectl
Browse files Browse the repository at this point in the history
  • Loading branch information
Frostman committed Apr 26, 2016
1 parent c7a1e5d commit 1736fa0
Show file tree
Hide file tree
Showing 8 changed files with 12 additions and 11 deletions.
2 changes: 1 addition & 1 deletion docs/man/man1/kubectl-describe.1
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ will first check for an exact match on TYPE and NAME\_PREFIX. If no such resourc
exists, it will output details for every resource that has a name prefixed with NAME\_PREFIX

.PP
Possible resource types include (case insensitive): pods (po), services (svc), deployments,
Possible resource types include (case insensitive): pods (po), services (svc), deployments (deploy),
replicasets (rs), replicationcontrollers (rc), nodes (no), events (ev), limitranges (limits),
persistentvolumes (pv), persistentvolumeclaims (pvc), resourcequotas (quota), namespaces (ns),
serviceaccounts (sa), ingresses (ing), horizontalpodautoscalers (hpa), daemonsets (ds), configmaps,
Expand Down
2 changes: 1 addition & 1 deletion docs/man/man1/kubectl-explain.1
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ kubectl explain \- Documentation of resources.
Documentation of resources.

.PP
Possible resource types include (case insensitive): pods (po), services (svc), deployments,
Possible resource types include (case insensitive): pods (po), services (svc), deployments (deploy),
replicasets (rs), replicationcontrollers (rc), nodes (no), events (ev), limitranges (limits),
persistentvolumes (pv), persistentvolumeclaims (pvc), resourcequotas (quota), namespaces (ns),
serviceaccounts (sa), ingresses (ing), horizontalpodautoscalers (hpa), daemonsets (ds), configmaps,
Expand Down
2 changes: 1 addition & 1 deletion docs/man/man1/kubectl-get.1
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ kubectl get \- Display one or many resources
Display one or many resources.

.PP
Possible resource types include (case insensitive): pods (po), services (svc), deployments,
Possible resource types include (case insensitive): pods (po), services (svc), deployments (deploy),
replicasets (rs), replicationcontrollers (rc), nodes (no), events (ev), limitranges (limits),
persistentvolumes (pv), persistentvolumeclaims (pvc), resourcequotas (quota), namespaces (ns),
serviceaccounts (sa), ingresses (ing), horizontalpodautoscalers (hpa), daemonsets (ds), configmaps,
Expand Down
4 changes: 2 additions & 2 deletions docs/user-guide/kubectl/kubectl_describe.md
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ $ kubectl describe TYPE NAME_PREFIX
will first check for an exact match on TYPE and NAME_PREFIX. If no such resource
exists, it will output details for every resource that has a name prefixed with NAME_PREFIX

Possible resource types include (case insensitive): pods (po), services (svc), deployments,
Possible resource types include (case insensitive): pods (po), services (svc), deployments (deploy),
replicasets (rs), replicationcontrollers (rc), nodes (no), events (ev), limitranges (limits),
persistentvolumes (pv), persistentvolumeclaims (pvc), resourcequotas (quota), namespaces (ns),
serviceaccounts (sa), ingresses (ing), horizontalpodautoscalers (hpa), daemonsets (ds), configmaps,
Expand Down Expand Up @@ -123,7 +123,7 @@ kubectl describe pods frontend

* [kubectl](kubectl.md) - kubectl controls the Kubernetes cluster manager

###### Auto generated by spf13/cobra on 30-Mar-2016
###### Auto generated by spf13/cobra on 26-Apr-2016

<!-- BEGIN MUNGE: GENERATED_ANALYTICS -->
[![Analytics](https://kubernetes-site.appspot.com/UA-36037335-10/GitHub/docs/user-guide/kubectl/kubectl_describe.md?pixel)]()
Expand Down
4 changes: 2 additions & 2 deletions docs/user-guide/kubectl/kubectl_explain.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ Documentation of resources.

Documentation of resources.

Possible resource types include (case insensitive): pods (po), services (svc), deployments,
Possible resource types include (case insensitive): pods (po), services (svc), deployments (deploy),
replicasets (rs), replicationcontrollers (rc), nodes (no), events (ev), limitranges (limits),
persistentvolumes (pv), persistentvolumeclaims (pvc), resourcequotas (quota), namespaces (ns),
serviceaccounts (sa), ingresses (ing), horizontalpodautoscalers (hpa), daemonsets (ds), configmaps,
Expand Down Expand Up @@ -100,7 +100,7 @@ kubectl explain pods.spec.containers

* [kubectl](kubectl.md) - kubectl controls the Kubernetes cluster manager

###### Auto generated by spf13/cobra on 30-Mar-2016
###### Auto generated by spf13/cobra on 26-Apr-2016

<!-- BEGIN MUNGE: GENERATED_ANALYTICS -->
[![Analytics](https://kubernetes-site.appspot.com/UA-36037335-10/GitHub/docs/user-guide/kubectl/kubectl_explain.md?pixel)]()
Expand Down
4 changes: 2 additions & 2 deletions docs/user-guide/kubectl/kubectl_get.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ Display one or many resources

Display one or many resources.

Possible resource types include (case insensitive): pods (po), services (svc), deployments,
Possible resource types include (case insensitive): pods (po), services (svc), deployments (deploy),
replicasets (rs), replicationcontrollers (rc), nodes (no), events (ev), limitranges (limits),
persistentvolumes (pv), persistentvolumeclaims (pvc), resourcequotas (quota), namespaces (ns),
serviceaccounts (sa), ingresses (ing), horizontalpodautoscalers (hpa), daemonsets (ds), configmaps,
Expand Down Expand Up @@ -135,7 +135,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 30-Mar-2016
###### Auto generated by spf13/cobra on 26-Apr-2016

<!-- BEGIN MUNGE: GENERATED_ANALYTICS -->
[![Analytics](https://kubernetes-site.appspot.com/UA-36037335-10/GitHub/docs/user-guide/kubectl/kubectl_get.md?pixel)]()
Expand Down
2 changes: 1 addition & 1 deletion pkg/kubectl/cmd/cmd.go
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,7 @@ __custom_func() {
* componentstatuses (aka 'cs')
* configmaps
* daemonsets (aka 'ds')
* deployments
* deployments (aka 'deploy')
* events (aka 'ev')
* endpoints (aka 'ep')
* horizontalpodautoscalers (aka 'hpa')
Expand Down
3 changes: 2 additions & 1 deletion pkg/kubectl/kubectl.go
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ import (
const (
kubectlAnnotationPrefix = "kubectl.kubernetes.io/"
// TODO: auto-generate this
PossibleResourceTypes = `Possible resource types include (case insensitive): pods (po), services (svc), deployments,
PossibleResourceTypes = `Possible resource types include (case insensitive): pods (po), services (svc), deployments (deploy),
replicasets (rs), replicationcontrollers (rc), nodes (no), events (ev), limitranges (limits),
persistentvolumes (pv), persistentvolumeclaims (pvc), resourcequotas (quota), namespaces (ns),
serviceaccounts (sa), ingresses (ing), horizontalpodautoscalers (hpa), daemonsets (ds), configmaps,
Expand Down Expand Up @@ -145,6 +145,7 @@ var shortForms = map[string]string{
// If you add an entry here, please also take a look at pkg/kubectl/cmd/cmd.go
// and add an entry to valid_resources when appropriate.
"cs": "componentstatuses",
"deploy": "deployments",
"ds": "daemonsets",
"ep": "endpoints",
"ev": "events",
Expand Down

1 comment on commit 1736fa0

@k8s-teamcity-mesosphere

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

TeamCity OSS :: Kubernetes Mesos :: 4 - Smoke Tests Build 22700 outcome was FAILURE
Summary: Exit code 1 (new) Build time: 00:29:09

Please sign in to comment.