-
Notifications
You must be signed in to change notification settings - Fork 13
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 startup checks #293
Add startup checks #293
Conversation
management/src/main/scala/org/apache/pekko/management/internal/HealthChecksImpl.scala
Outdated
Show resolved
Hide resolved
Conceptually, I think this is fine. Users would need to configure startup checks for the changes to have an effect. So I think we are fine to include these changes in pekk0-management v1.1.0. Maybe, I'm missing something but so far, this seems low risk. There is a javafmt issue that is breaking the build. |
4383445
to
94ee8e8
Compare
if i remember correctly, Kubernetes recommend TCP probe rather than HTTP probe for startup probe, because efficiency reason. |
94ee8e8
to
4ba9780
Compare
I've added the mima exclusions in the last update. |
management/src/main/mima-filters/1.1.x.backwards.excludes/startup-checks.backwards.excludes
Outdated
Show resolved
Hide resolved
In theory, we could support TCP based checks for readiness and liveness too. Maybe we could add a separate enhancement (a later PR) where we support configs like 'startup-check-type', 'readiness-check-type' and 'liveness-check-type' (defaulting to 'http') to maintain compatibility. |
I think I don't deep dive into health checks yet, but i think it just expose HTTP endpoint and then response anyway, i will take time to deep divde into it immdiately. |
5355664
to
0b7a05e
Compare
0b7a05e
to
dc05700
Compare
* @param readinessChecks List of FQCN of readiness checks | ||
* @param livenessChecks List of FQCN of liveness checks | ||
* @param startupPath The path to serve startup on | ||
* @param readinessPath The path to serve readiness on | ||
* @param livenessPath The path to serve liveness on | ||
* @param checkTimeout how long to wait for all health checks to complete | ||
*/ | ||
final class HealthCheckSettings( |
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.
Ah, this class is already final
, so no annotation necessary here 👍
@DoNotInherit | ||
abstract class HealthChecks { |
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.
And this one already has DoNotInherit
, so indeed the ReversedMissingMethodProblem
MiMa warnings can be safely ignored here 👍
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.
lgtm
Applying this PR will add startup checks, similar to the readiness and liveness checks. Startup probes reached GA in Kubernetes 1.20. I recognize that adding this feature in a compatible way might be an issue, any advice in that regard is welcome. :)