-
Notifications
You must be signed in to change notification settings - Fork 234
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
Cannot implements rest.GetterWithOptions in custom REST storage #179
Comments
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. |
Rotten issues close after 30d of inactivity. Send feedback to sig-testing, kubernetes/test-infra and/or fejta. |
@fejta-bot: Closing this issue. 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. |
Actually, starting the apiserver with a REST resource implementing GetterWithOptions with NewGetOptions returning a type registered in the scheme of the REST resource model will fail with the following error :
error in registering resource: {resourcename}, no kind {GetOptionKind} is registered for version "v1"
This is caused by the fact that when constructing the APIGroupInfo ( in
pkg/builders/api_group_builder#Build
), the fieldOptionsExternalVersion
is not populated, and therefore set to the default that's defined ink8s.io/apiserver/pkg/server/genericapiserver#NewDefaultAPIGroupInfo
:&schema.GroupVersion{Version: "v1"}
, which does not contains our{GetOptionKind}
the endpoint installer is then using this default groupversion when trying to resolve the type of get custom get options, resulting in given error.
This is quickly fixed by adding a single line :
after the line
in
pkg/builders/api_group_builder#Build
The text was updated successfully, but these errors were encountered: