mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-08-01 15:58:37 +00:00
Merge pull request #18346 from soltysh/issue17363
Auto commit by PR queue bot
This commit is contained in:
commit
8ceb947b63
@ -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
|
||||
|
||||
|
@ -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')
|
||||
`
|
||||
)
|
||||
|
||||
|
@ -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.")
|
||||
}
|
||||
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user