Skip to content
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

Merged
merged 1 commit into from
Sep 25, 2024
Merged

Add startup checks #293

merged 1 commit into from
Sep 25, 2024

Conversation

Philippus
Copy link
Contributor

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. :)

@pjfanning
Copy link
Contributor

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.

@Roiocam
Copy link
Member

Roiocam commented Aug 28, 2024

if i remember correctly, Kubernetes recommend TCP probe rather than HTTP probe for startup probe, because efficiency reason.

@Philippus
Copy link
Contributor Author

I've added the mima exclusions in the last update.

@pjfanning
Copy link
Contributor

if i remember correctly, Kubernetes recommend TCP probe rather than HTTP probe for startup probe, because efficiency reason.

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.

@Roiocam
Copy link
Member

Roiocam commented Aug 29, 2024

if i remember correctly, Kubernetes recommend TCP probe rather than HTTP probe for startup probe, because efficiency reason.

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 pekko-management was probe destination provider, this PR provide HTTP endpoint as startup check(for startup probe use).

I don't deep dive into health checks yet, but i think it just expose HTTP endpoint and then response ok to requestor, what's difference between to startup checks? i don't think it has.

anyway, i will take time to deep divde into it immdiately.

* @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(
Copy link
Member

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 👍

Comment on lines 39 to 40
@DoNotInherit
abstract class HealthChecks {
Copy link
Member

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 👍

@pjfanning pjfanning added this to the 1.1.0-M2 milestone Sep 9, 2024
Copy link
Contributor

@pjfanning pjfanning left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

@pjfanning pjfanning merged commit 2caae13 into apache:main Sep 25, 2024
15 checks passed
@Philippus Philippus deleted the add-startup-checks branch September 25, 2024 09:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants