-
Notifications
You must be signed in to change notification settings - Fork 41.4k
kube-aggregator: sync startup with APIService handlers #93286
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
kube-aggregator: sync startup with APIService handlers #93286
Conversation
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: sttts 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 |
/assign @lavalamp |
Some sort of a test would be nice? |
|
||
s.proxyHandlersLock.Lock() | ||
handled := sets.StringKeySet(s.proxyHandlers) | ||
s.proxyHandlersLock.Unlock() |
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.
nit: defer?
if s.openAPIAggregationController != nil { | ||
s.openAPIAggregationController.AddAPIService(proxyHandler, apiService) | ||
// this is calling a controller. It should already handle being async. | ||
go func() { |
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 is suspicious. the AddAPIService
is merely pushing tasks into queue, we don't need to spawn a new routine, is it?
|
||
import ( | ||
"fmt" | ||
"k8s.io/klog/v2" |
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.
Import ordering?
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. |
/remove-lifecycle stale |
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. |
@sttts: PR needs rebase. 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. |
Stale issues rot after 30d of inactivity. If this issue is safe to close now please do so with Send feedback to sig-contributor-experience at kubernetes/community. |
There is a race of the apiserver setting up the api service handlers and reporting readiness. This PR adds a synchronization between two via a post-start hook.
/kind bug