mirror of https://github.com/k3s-io/k3s
Merge pull request #46511 from deads2k/crd-04-short
Automatic merge from submit-queue add crd shortname Adds a shortname, `crd`, for `CustomResourceDefinition`.pull/6/head
commit
8951bb609d
|
@ -58,6 +58,14 @@ func NewREST(scheme *runtime.Scheme, optsGetter generic.RESTOptionsGetter) *REST
|
||||||
return &REST{store}
|
return &REST{store}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 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{"crd"}
|
||||||
|
}
|
||||||
|
|
||||||
// Delete adds the CRD finalizer to the list
|
// Delete adds the CRD finalizer to the list
|
||||||
func (r *REST) Delete(ctx genericapirequest.Context, name string, options *metav1.DeleteOptions) (runtime.Object, bool, error) {
|
func (r *REST) Delete(ctx genericapirequest.Context, name string, options *metav1.DeleteOptions) (runtime.Object, bool, error) {
|
||||||
obj, err := r.Get(ctx, name, &metav1.GetOptions{})
|
obj, err := r.Get(ctx, name, &metav1.GetOptions{})
|
||||||
|
|
Loading…
Reference in New Issue