add shorthand cm for configmaps

This commit is contained in:
lojies 2016-07-27 10:54:11 +08:00
parent b7e8791746
commit 79f09cb687
2 changed files with 3 additions and 2 deletions

View File

@ -158,7 +158,7 @@ __custom_func() {
// and add a short forms entry in expandResourceShortcut() when appropriate.
valid_resources = `Valid resource types include:
* componentstatuses (aka 'cs')
* configmaps
* configmaps (aka 'cm')
* daemonsets (aka 'ds')
* deployments (aka 'deploy')
* events (aka 'ev')

View File

@ -34,7 +34,7 @@ const (
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,
serviceaccounts (aka 'sa'), ingresses (aka 'ing'), horizontalpodautoscalers (aka 'hpa'), daemonsets (aka 'ds'), configmaps (aka 'cm'),
componentstatuses (aka 'cs), endpoints (aka 'ep'), petsets (alpha feature, may be unstable) and secrets.`
)
@ -148,6 +148,7 @@ var shortForms = map[string]string{
// Please keep this alphabetized
// 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.
"cm": "configmaps",
"cs": "componentstatuses",
"deploy": "deployments",
"ds": "daemonsets",