Merge pull request #18346 from soltysh/issue17363

Auto commit by PR queue bot
This commit is contained in:
k8s-merge-robot 2015-12-16 21:25:52 -08:00
commit 8ceb947b63
4 changed files with 31 additions and 29 deletions

View File

@ -134,21 +134,24 @@ The following table includes a list of all the supported resource types and thei
Resource type | Abbreviated alias
-------------------- | --------------------
`componentstatuses` | `cs`
`events` | `ev`
`endpoints` | `ep`
`horizontalpodautoscalers` | `hpa`
`limitranges` | `limits`
`nodes` | `no`
`namespaces` | `ns`
`pods` | `po`
`persistentvolumes` | `pv`
`persistentvolumeclaims` | `pvc`
`resourcequotas` | `quota`
`replicationcontrollers` | `rc`
`secrets` |
`serviceaccounts` |
`services` | `svc`
`ingress` | `ing`
`daemonsets` | `ds`
`deployments` |
`events` | `ev`
`endpoints` | `ep`
`horizontalpodautoscalers` | `hpa`
`ingresses` | `ing`
`jobs` |
`limitranges` | `limits`
`nodes` | `no`
`namespaces` | `ns`
`pods` | `po`
`persistentvolumes` | `pv`
`persistentvolumeclaims` | `pvc`
`resourcequotas` | `quota`
`replicationcontrollers` | `rc`
`secrets` |
`serviceaccounts` |
`services` | `svc`
## Output options

View File

@ -110,23 +110,24 @@ __custom_func() {
}
`
valid_resources = `Valid resource types include:
* pods (aka 'po')
* replicationcontrollers (aka 'rc')
* daemonsets (aka 'ds')
* services (aka 'svc')
* componentstatuses (aka 'cs')
* events (aka 'ev')
* endpoints (aka 'ep')
* horizontalpodautoscalers (aka 'hpa')
* ingress (aka 'ing')
* jobs
* limitranges (aka 'limits')
* nodes (aka 'no')
* namespaces (aka 'ns')
* secrets
* pods (aka 'po')
* persistentvolumes (aka 'pv')
* persistentvolumeclaims (aka 'pvc')
* limitranges (aka 'limits')
* resourcequotas (aka 'quota')
* componentstatuses (aka 'cs')
* endpoints (aka 'ep')
* quota
* horizontalpodautoscalers (aka 'hpa')
* resourcequotas (aka 'quota')
* replicationcontrollers (aka 'rc')
* secrets
* serviceaccounts
* services (aka 'svc')
`
)

View File

@ -119,9 +119,7 @@ func RunGet(f *cmdutil.Factory, out io.Writer, cmd *cobra.Command, args []string
}
if len(args) == 0 && len(options.Filenames) == 0 {
fmt.Fprint(out, "You must specify the type of resource to get. ", valid_resources, ` * componentstatuses (aka 'cs')
* endpoints (aka 'ep')
`)
fmt.Fprint(out, "You must specify the type of resource to get. ", valid_resources)
return cmdutil.UsageError(cmd, "Required resource not specified.")
}

View File

@ -201,7 +201,7 @@ func NewFactory(optionalClientConfig clientcmd.ClientConfig) *Factory {
if describer, ok := kubectl.DescriberFor(mapping.GroupVersionKind.GroupKind(), client); ok {
return describer, nil
}
return nil, fmt.Errorf("no description has been implemented for %q", mapping.Kind)
return nil, fmt.Errorf("no description has been implemented for %q", mapping.GroupVersionKind.Kind)
},
Printer: func(mapping *meta.RESTMapping, noHeaders, withNamespace bool, wide bool, showAll bool, absoluteTimestamps bool, columnLabels []string) (kubectl.ResourcePrinter, error) {
return kubectl.NewHumanReadablePrinter(noHeaders, withNamespace, wide, showAll, absoluteTimestamps, columnLabels), nil