-
Notifications
You must be signed in to change notification settings - Fork 40k
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
Add ability to skip OpenAPI handler installation #100341
Add ability to skip OpenAPI handler installation #100341
Conversation
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.
/assign @liggitt
71c657b
to
5836525
Compare
5836525
to
9796b9e
Compare
9796b9e
to
7fafb86
Compare
7fafb86
to
503fd63
Compare
cc @apelisse |
Thinking about Anotine's feedback about not wanting to store a bool another idea I have is to require consumers to set the Then, the handler installation is triggered by the spec being non-nil rather than the config. Instead of calling The end result is that GenericAPIServer's This seems like a better approach in terms of decoupling the |
Okay, I just spoke to @apelisse and we decided to continue with the boolean approach. My suggestion about requiring consumers to pass the spec could introduce a big foot-gun where the spec doesn't match the config and so we'd probably need to generate the spec anyways to check for that. Other ideas like passing a function in the config to optionally convert to a spec seemed like overkill compared to the bool, so we've agreed on that for now. Thoughts? PTAL @liggitt |
yeah, this seems reasonable /lgtm |
/milestone v1.21 avoids a spurious stack trace in the API server log on every start as a regression in 1.21 |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: kevindelgado, liggitt The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
503fd63
to
66d2f43
Compare
Can you give it another lgtm @liggitt, I had to change the name of the config in |
/lgtm |
/retest |
What type of PR is this?
/kind bug
What this PR does / why we need it:
This provides the ability to configure a GenericAPIServer to not install the OpenAPI handler so that the kube-aggregator (which has its own OpenAPI handler) does not double register the openapi/v2 handler.
Which issue(s) this PR fixes:
Addresses #99046 (comment)
Does this PR introduce a user-facing change?