Merge pull request #59061 from nikhita/crds-is-a-thing

Automatic merge from submit-queue. If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

Add crds as CustomResourceDefinition shortname

See https://github.com/kubernetes/apiextensions-apiserver/issues/6#issuecomment-361539766.
Fixes kubernetes/apiextensions-apiserver#6

Before:

```
➜  kubectl get crds
the server doesn't have a resource type "crds"
```

After:

```
➜  kubectl get crds
No resources found.
```


**Release note**:

```release-note
 `crds` is added as a shortname for CustomResourceDefinition i.e. `kubectl get crds` can now be used.
```

/cc sttts deads2k soltysh pwittrock
This commit is contained in:
Kubernetes Submit Queue 2018-01-31 05:48:41 -08:00 committed by GitHub
commit 4ce4bdc82c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -62,7 +62,7 @@ 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"}
return []string{"crd", "crds"}
}
// Delete adds the CRD finalizer to the list