API server should offer metav1 Table/Partial transforms

Now that internal types are equivalent, allow the apiserver to serve
metav1 and metav1beta1 depending on the client. Test that in the
apiserver integration test and ensure we get the appropriate responses.

Register the metav1 type in the appropriate external locations.
This commit is contained in:
Clayton Coleman
2019-05-04 16:55:49 -04:00
parent e256c15df3
commit 33a3e325f7
10 changed files with 594 additions and 111 deletions

View File

@@ -57,7 +57,8 @@ import (
func init() {
// Register external types for Scheme
metav1.AddToGroupVersion(Scheme, schema.GroupVersion{Version: "v1"})
utilruntime.Must(metav1beta1.AddToScheme(Scheme))
utilruntime.Must(metav1beta1.AddMetaToScheme(Scheme))
utilruntime.Must(metav1.AddMetaToScheme(Scheme))
utilruntime.Must(scheme.AddToScheme(Scheme))
utilruntime.Must(Scheme.SetVersionPriority(corev1.SchemeGroupVersion))