Extend all to more resources

Added more things from the list here:
https://github.com/kubernetes/kubernetes/blob/master/pkg/kubectl/cmd/cmd.go#L159

Update the devel/kubectl-conventions.md with the rules mentioned by
a few folks on which resources could be added to the special 'all' alias
This commit is contained in:
Davanum Srinivas
2016-07-14 07:48:32 -04:00
parent 87b40782c9
commit e1373cf516
8 changed files with 147 additions and 17 deletions

View File

@@ -37,16 +37,16 @@ func TestReplaceAliases(t *testing.T) {
{
name: "all-replacement",
arg: "all",
expected: "rc,svc,pods,pvc",
expected: "pods,replicationcontrollers,services,petsets,horizontalpodautoscalers,jobs,deployments,replicasets",
},
{
name: "alias-in-comma-separated-arg",
arg: "all,secrets",
expected: "rc,svc,pods,pvc,secrets",
expected: "pods,replicationcontrollers,services,petsets,horizontalpodautoscalers,jobs,deployments,replicasets,secrets",
},
}
mapper := NewShortcutExpander(testapi.Default.RESTMapper())
mapper := NewShortcutExpander(testapi.Default.RESTMapper(), nil)
for _, test := range tests {
resources := []string{}