New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Remove old-style conversions registration #85891
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -19,7 +19,6 @@ package v1beta1 | |
import ( | ||
"k8s.io/apimachinery/pkg/runtime" | ||
"k8s.io/apimachinery/pkg/runtime/schema" | ||
utilruntime "k8s.io/apimachinery/pkg/util/runtime" | ||
) | ||
|
||
// GroupName is the group name for this API. | ||
|
@@ -33,12 +32,6 @@ func Kind(kind string) schema.GroupKind { | |
return SchemeGroupVersion.WithKind(kind).GroupKind() | ||
} | ||
|
||
// scheme is the registry for the common types that adhere to the meta v1beta1 API spec. | ||
var scheme = runtime.NewScheme() | ||
|
||
// ParameterCodec knows about query parameters used with the meta v1beta1 API spec. | ||
var ParameterCodec = runtime.NewParameterCodec(scheme) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. No one was using the ParameterCodec here? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. From v1beta1 - noone in k/k repo and anywhere else that I managed to check. |
||
|
||
// AddMetaToScheme registers base meta types into schemas. | ||
func AddMetaToScheme(scheme *runtime.Scheme) error { | ||
scheme.AddKnownTypes(SchemeGroupVersion, | ||
|
@@ -48,14 +41,5 @@ func AddMetaToScheme(scheme *runtime.Scheme) error { | |
&PartialObjectMetadataList{}, | ||
) | ||
|
||
return scheme.AddConversionFuncs( | ||
Convert_Slice_string_To_v1beta1_IncludeObjectPolicy, | ||
) | ||
} | ||
|
||
func init() { | ||
utilruntime.Must(AddMetaToScheme(scheme)) | ||
|
||
// register manually. This usually goes through the SchemeBuilder, which we cannot use here. | ||
utilruntime.Must(RegisterDefaults(scheme)) | ||
return nil | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This isn't needed because below we're calling
metav1.AddToGroupVersion
, which is registering all the necessary conversions (including these ones).