Drop duplicate logic for unversioned type registration

Signed-off-by: Monis Khan <mok@vmware.com>
This commit is contained in:
Monis Khan 2021-02-03 10:20:27 -05:00
parent 012bebd66e
commit 300d7bd99c
No known key found for this signature in database
GPG Key ID: 52C90ADA01B269B8

View File

@ -229,16 +229,7 @@ func getAggregatedAPIServerScheme(apiGroup string) *runtime.Scheme {
scheme := runtime.NewScheme() scheme := runtime.NewScheme()
// add the options to empty v1 // add the options to empty v1
metav1.AddToGroupVersion(scheme, schema.GroupVersion{Version: "v1"}) metav1.AddToGroupVersion(scheme, metav1.Unversioned)
unversioned := schema.GroupVersion{Group: "", Version: "v1"}
scheme.AddUnversionedTypes(unversioned,
&metav1.Status{},
&metav1.APIVersions{},
&metav1.APIGroupList{},
&metav1.APIGroup{},
&metav1.APIResourceList{},
)
// nothing fancy is required if using the standard group // nothing fancy is required if using the standard group
if apiGroup == loginv1alpha1.GroupName { if apiGroup == loginv1alpha1.GroupName {