Merge pull request #41122 from sttts/sttts-meta-deepcopy

Automatic merge from submit-queue (batch tested with PRs 38252, 41122, 36101, 41017, 41264)

Register deepcopy and defaulter funcs for metav1

Houston, we've had a problem here. ObjectMeta had used the reflection fallback path for deepcopy for probably some time.

Remark: my original plan for https://github.com/kubernetes/kubernetes/pull/36412 was/is to rebase that during the master branch freeze for 1.6 and get it merged just before master opens again. Otherwise, I fear it will be rebase hell. With https://github.com/kubernetes/kubernetes/pull/36412 these kind of errors are not possible anymore.
pull/6/head
Kubernetes Submit Queue 2017-02-10 15:59:39 -08:00 committed by GitHub
commit d7ae4161be
1 changed files with 8 additions and 0 deletions

View File

@ -55,6 +55,10 @@ func AddToGroupVersion(scheme *runtime.Scheme, groupVersion schema.GroupVersion)
Convert_watch_Event_to_versioned_Event,
Convert_versioned_Event_to_versioned_InternalEvent,
)
// register manually. This usually goes through the SchemeBuilder, which we cannot use here.
scheme.AddGeneratedDeepCopyFuncs(GetGeneratedDeepCopyFuncs()...)
RegisterDefaults(scheme)
}
// scheme is the registry for the common types that adhere to the meta v1 API spec.
@ -70,4 +74,8 @@ func init() {
&GetOptions{},
&DeleteOptions{},
)
// register manually. This usually goes through the SchemeBuilder, which we cannot use here.
scheme.AddGeneratedDeepCopyFuncs(GetGeneratedDeepCopyFuncs()...)
RegisterDefaults(scheme)
}