mirror of https://github.com/k3s-io/k3s
Merge pull request #21509 from madhusudancs/kubectl-get-list-deployments-daemonsets
Add DaemonSets and Deployments to valid resources list in kubectl.pull/6/head
commit
80614896db
|
@ -110,8 +110,13 @@ __custom_func() {
|
|||
esac
|
||||
}
|
||||
`
|
||||
|
||||
// If you add a resource to this list, please also take a look at pkg/kubectl/kubectl.go
|
||||
// and add a short forms entry in expandResourceShortcut() when appropriate.
|
||||
valid_resources = `Valid resource types include:
|
||||
* componentstatuses (aka 'cs')
|
||||
* daemonsets (aka 'ds')
|
||||
* deployments
|
||||
* events (aka 'ev')
|
||||
* endpoints (aka 'ep')
|
||||
* horizontalpodautoscalers (aka 'hpa')
|
||||
|
|
|
@ -100,6 +100,8 @@ func (e ShortcutExpander) ResourceSingularizer(resource string) (string, error)
|
|||
func expandResourceShortcut(resource unversioned.GroupVersionResource) unversioned.GroupVersionResource {
|
||||
shortForms := map[string]unversioned.GroupVersionResource{
|
||||
// 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.
|
||||
"cs": api.SchemeGroupVersion.WithResource("componentstatuses"),
|
||||
"ds": extensions.SchemeGroupVersion.WithResource("daemonsets"),
|
||||
"ep": api.SchemeGroupVersion.WithResource("endpoints"),
|
||||
|
|
Loading…
Reference in New Issue