Merge pull request #24087 from Frostman/kubectl-abbr-dpl

Automatic merge from submit-queue

Add "deploy" abbrev for deployments to kubectl

Most of the objects have the abbreviation (short form) in kubectl, for ex. rc == replicationcontroller. It'll be useful to have an abbrev for "deployments" as well and I'm proposing to use "dpl" for it.

P.S. It's my very first commit to k8s. I've signed CLA already. I've decided to create this pull request while waiting on more info in #24083.

<!-- Reviewable:start -->
---
This change is [<img src="http://reviewable.k8s.io/review_button.svg" height="35" align="absmiddle" alt="Reviewable"/>](http://reviewable.k8s.io/reviews/kubernetes/kubernetes/24087)
<!-- Reviewable:end -->
This commit is contained in:
k8s-merge-robot 2016-07-12 08:43:59 -07:00 committed by GitHub
commit 4018101a43
2 changed files with 3 additions and 2 deletions

View File

@ -160,7 +160,7 @@ __custom_func() {
* componentstatuses (aka 'cs')
* configmaps
* daemonsets (aka 'ds')
* deployments
* deployments (aka 'deploy')
* events (aka 'ev')
* endpoints (aka 'ep')
* horizontalpodautoscalers (aka 'hpa')

View File

@ -31,7 +31,7 @@ import (
const (
kubectlAnnotationPrefix = "kubectl.kubernetes.io/"
// TODO: auto-generate this
PossibleResourceTypes = `Possible resource types include (case insensitive): pods (aka 'po'), services (aka 'svc'), deployments,
PossibleResourceTypes = `Possible resource types include (case insensitive): pods (aka 'po'), services (aka 'svc'), deployments (aka 'deploy'),
replicasets (aka 'rs'), replicationcontrollers (aka 'rc'), nodes (aka 'no'), events (aka 'ev'), limitranges (aka 'limits'),
persistentvolumes (aka 'pv'), persistentvolumeclaims (aka 'pvc'), resourcequotas (aka 'quota'), namespaces (aka 'ns'),
serviceaccounts (aka 'sa'), ingresses (aka 'ing'), horizontalpodautoscalers (aka 'hpa'), daemonsets (aka 'ds'), configmaps,
@ -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",