mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-08-03 17:30:00 +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
|
Resource type | Abbreviated alias
|
||||||
-------------------- | --------------------
|
-------------------- | --------------------
|
||||||
`componentstatuses` | `cs`
|
`componentstatuses` | `cs`
|
||||||
`events` | `ev`
|
`daemonsets` | `ds`
|
||||||
`endpoints` | `ep`
|
`deployments` |
|
||||||
`horizontalpodautoscalers` | `hpa`
|
`events` | `ev`
|
||||||
`limitranges` | `limits`
|
`endpoints` | `ep`
|
||||||
`nodes` | `no`
|
`horizontalpodautoscalers` | `hpa`
|
||||||
`namespaces` | `ns`
|
`ingresses` | `ing`
|
||||||
`pods` | `po`
|
`jobs` |
|
||||||
`persistentvolumes` | `pv`
|
`limitranges` | `limits`
|
||||||
`persistentvolumeclaims` | `pvc`
|
`nodes` | `no`
|
||||||
`resourcequotas` | `quota`
|
`namespaces` | `ns`
|
||||||
`replicationcontrollers` | `rc`
|
`pods` | `po`
|
||||||
`secrets` |
|
`persistentvolumes` | `pv`
|
||||||
`serviceaccounts` |
|
`persistentvolumeclaims` | `pvc`
|
||||||
`services` | `svc`
|
`resourcequotas` | `quota`
|
||||||
`ingress` | `ing`
|
`replicationcontrollers` | `rc`
|
||||||
|
`secrets` |
|
||||||
|
`serviceaccounts` |
|
||||||
|
`services` | `svc`
|
||||||
|
|
||||||
## Output options
|
## Output options
|
||||||
|
|
||||||
|
@ -110,23 +110,24 @@ __custom_func() {
|
|||||||
}
|
}
|
||||||
`
|
`
|
||||||
valid_resources = `Valid resource types include:
|
valid_resources = `Valid resource types include:
|
||||||
* pods (aka 'po')
|
* componentstatuses (aka 'cs')
|
||||||
* replicationcontrollers (aka 'rc')
|
|
||||||
* daemonsets (aka 'ds')
|
|
||||||
* services (aka 'svc')
|
|
||||||
* events (aka 'ev')
|
* events (aka 'ev')
|
||||||
|
* endpoints (aka 'ep')
|
||||||
|
* horizontalpodautoscalers (aka 'hpa')
|
||||||
|
* ingress (aka 'ing')
|
||||||
|
* jobs
|
||||||
|
* limitranges (aka 'limits')
|
||||||
* nodes (aka 'no')
|
* nodes (aka 'no')
|
||||||
* namespaces (aka 'ns')
|
* namespaces (aka 'ns')
|
||||||
* secrets
|
* pods (aka 'po')
|
||||||
* persistentvolumes (aka 'pv')
|
* persistentvolumes (aka 'pv')
|
||||||
* persistentvolumeclaims (aka 'pvc')
|
* persistentvolumeclaims (aka 'pvc')
|
||||||
* limitranges (aka 'limits')
|
|
||||||
* resourcequotas (aka 'quota')
|
|
||||||
* componentstatuses (aka 'cs')
|
|
||||||
* endpoints (aka 'ep')
|
|
||||||
* quota
|
* quota
|
||||||
* horizontalpodautoscalers (aka 'hpa')
|
* resourcequotas (aka 'quota')
|
||||||
|
* replicationcontrollers (aka 'rc')
|
||||||
|
* secrets
|
||||||
* serviceaccounts
|
* 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 {
|
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')
|
fmt.Fprint(out, "You must specify the type of resource to get. ", valid_resources)
|
||||||
* endpoints (aka 'ep')
|
|
||||||
`)
|
|
||||||
return cmdutil.UsageError(cmd, "Required resource not specified.")
|
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 {
|
if describer, ok := kubectl.DescriberFor(mapping.GroupVersionKind.GroupKind(), client); ok {
|
||||||
return describer, nil
|
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) {
|
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
|
return kubectl.NewHumanReadablePrinter(noHeaders, withNamespace, wide, showAll, absoluteTimestamps, columnLabels), nil
|
||||||
|
Loading…
Reference in New Issue
Block a user