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
apiextensions: wait for complete discovery endpoint #89145
apiextensions: wait for complete discovery endpoint #89145
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 |
d149a43
to
c76ded2
Compare
c76ded2
to
99add1a
Compare
} | ||
return true, nil | ||
}, stopCh); err != nil { | ||
utilruntime.HandleError(fmt.Errorf("timed out waiting for discovery endpoint to initialize")) |
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.
panic on these please. Based on the code it should never happen, but I don't want to ever silently not run this.
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.
ok, timeout happens only when stopCh closed, so we can simply error
99add1a
to
34f5737
Compare
/lgtm |
/kind bug
The discovery endpoint is driven by an informer. During startup it adds CRDs asynchronously (in contrast to the main handler endpoint which is complete as soon as the lister has synched). As a consequence the discovery endpoint might be incomplete for a short period of time when the server starts up. This PR adds an explicit wait until all CRD version have been added to discovery.