Skip to content

Commit

Permalink
Merge pull request kubernetes#21509 from madhusudancs/kubectl-get-lis…
Browse files Browse the repository at this point in the history
…t-deployments-daemonsets

Add DaemonSets and Deployments to valid resources list in kubectl.
  • Loading branch information
bgrant0607 committed Feb 24, 2016
2 parents bea349a + 781480d commit 8061489
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
5 changes: 5 additions & 0 deletions pkg/kubectl/cmd/cmd.go
Original file line number Diff line number Diff line change
Expand Up @@ -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')
Expand Down
2 changes: 2 additions & 0 deletions pkg/kubectl/kubectl.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"),
Expand Down

0 comments on commit 8061489

Please sign in to comment.