-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
Unable to conversion-gen conversions that require a conversion.Scope #810
Comments
/priority awaiting-more-evidence |
@vincepri: Please ensure the request meets the requirements listed here. If this request no longer meets these requirements, the label can be removed In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
Issues go stale after 90d of inactivity. If this issue is safe to close now please do so with Send feedback to sig-testing, kubernetes/test-infra and/or fejta. |
Stale issues rot after 30d of inactivity. If this issue is safe to close now please do so with Send feedback to sig-testing, kubernetes/test-infra and/or fejta. |
/lifecycle frozen |
I ran into the same issue - conversion-gen is great to generate the default conversions between api versions, and controller-runtime is great for providing an easy setup for a conversion webhook, but I don't see a way to connect both nicely together. the |
Some functions autogenerated by conversion-gen produce code that looks like this:
The "inefficient conversion" can happen in a few different situations; in this case, it's because
SomeField
is a struct that lives in a package outside of the one where I'm generating conversions. Due to kubernetes/code-generator#94 (assuming there isn't a workaround), even if there were conversion functions forSomeField
, conversion-gen isn't able to see & use them.We presumably need access to a
conversion.Scope
in ourConvertTo
/ConvertFrom
implementations, but these are member functions on the types, and I haven't yet found any way to get access to aScope
(this appears to have a single, unexported implementation that is used internally by the conversion machinery code).Anyone know of a way to use generated conversion functions that need a
Scope
?The text was updated successfully, but these errors were encountered: