Commit 781480d7 authored by Madhusudan.C.S's avatar Madhusudan.C.S

Add DaemonSets and Deployments to valid resources list in kubectl.

parent f5082b6d
......@@ -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"),
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment