Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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
feat: add readiness and liveness probes to crossplane #4748
feat: add readiness and liveness probes to crossplane #4748
Changes from 1 commit
f2e382e
990228f
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
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.
Is there a way to add something like a started checker for the controllers?
Could it be helpful to report as ready only after controllers are operational, e.g. after acquiring the lease successfully.
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.
We could also check/do that only after we're aware of a use case that it would help.
Feel free to ignore for now.
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.
Yeah, we could definitely do something, but I couldn't find many examples of other projects doing much more than this. Acquiring the lease could not be the right condition though as we want to support multiple replicas serving webhooks, @sttts was talking about caches being populated, any additional hint/pointer to prior art?
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.
I don't think readiness is connected to leader election. It's a blackbox property whether the pod is ready to serve traffic (via the webhook). Controllers are always async. No need to wait for them. What does waiting for them even mean?
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.
Agree, @sttts. What did you have in mind by "waiting for informers" here? I was referring to that when I asked if you had any prior reference implementation to share.
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.
If functionality of the process depends on informers to sync, then they should be part of readiness. E.g. admission in kube cannot work correctly without synced informers. Hence, the kube-apiserver might return inconsistent results prior to that.
Don't think it matters here much.
You could delay readiness by
mgr.GetCache().WaitForSync()
or so.