Merge pull request #65116 from sttts/sttts-apiextensions-crd-example-meta-types

Automatic merge from submit-queue (batch tested with PRs 65116, 61718, 65140, 65128, 65099). 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>.

apiextensions: add AddToGroupVersion call to CRD example register.go

Avoid `v1.ListOptions is not suitable for converting to ...` message in CRD client on List.

https://github.com/kubernetes/kubernetes/pull/57243 did the same for the sample-controller.
This commit is contained in:
Kubernetes Submit Queue 2018-06-21 13:59:05 -07:00 committed by GitHub
commit ed47d75f75
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -17,6 +17,7 @@ limitations under the License.
package v1
import (
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
"k8s.io/apimachinery/pkg/runtime"
"k8s.io/apimachinery/pkg/runtime/schema"
@ -47,5 +48,6 @@ func addKnownTypes(scheme *runtime.Scheme) error {
&Example{},
&ExampleList{},
)
metav1.AddToGroupVersion(scheme, SchemeGroupVersion)
return nil
}