From e1fdb8b027c43dc4dbc5317b76702c8b861f9fd4 Mon Sep 17 00:00:00 2001 From: Justin Santa Barbara Date: Wed, 10 May 2017 09:57:36 -0400 Subject: [PATCH] Add sts alias for kubectl statefulset Saves a lot of typing! --- pkg/registry/apps/statefulset/storage/storage.go | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/pkg/registry/apps/statefulset/storage/storage.go b/pkg/registry/apps/statefulset/storage/storage.go index f7ba0c7e511..8e60c9e0885 100644 --- a/pkg/registry/apps/statefulset/storage/storage.go +++ b/pkg/registry/apps/statefulset/storage/storage.go @@ -76,3 +76,11 @@ func (r *StatusREST) Get(ctx genericapirequest.Context, name string, options *me func (r *StatusREST) Update(ctx genericapirequest.Context, name string, objInfo rest.UpdatedObjectInfo) (runtime.Object, bool, error) { return r.store.Update(ctx, name, objInfo) } + +// Implement ShortNamesProvider +var _ rest.ShortNamesProvider = &REST{} + +// ShortNames implements the ShortNamesProvider interface. Returns a list of short names for a resource. +func (r *REST) ShortNames() []string { + return []string{"sts"} +}