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

SpringBootHealthCheckEnricher : Add /actuator/startup as startup probe if enabled #1467

Closed
rohanKanojia opened this issue Apr 22, 2022 · 4 comments
Labels
enhancement New feature or request
Milestone

Comments

@rohanKanojia
Copy link
Member

Description

Related to #1322

Spring Boot actuator provides a startup endpoint which shows startup data. Here is a sample response

{
  "springBootVersion": "2.5.6",
  "timeline": {
    "startTime": "2022-04-22T10:47:05.426341763Z",
    "events": [
      {
        "endTime": "2022-04-22T10:47:05.520464398Z",
        "duration": "PT0.062466167S",
        "startupStep": {
          "name": "spring.boot.application.starting",

I think this endpoint can be used by SpringBootHealthCheckEnricher as a startup probe. SpringBootHealthCheckEnricher should check whether startup is enabled or not; If enabled, it should add this endpoint as a startup probe in controller's PodTemplateSpec.

@Prathamkrishna
Copy link
Contributor

I think i could pick this up if no one else has plans

@manusa
Copy link
Member

manusa commented Apr 22, 2022

We need to check if this is also supported in SpringBoot 1.x

@Prathamkrishna
Copy link
Contributor

Prathamkrishna commented Apr 23, 2022

yep, it is is supported in SpringBoot 1.x
-> https://www.baeldung.com/spring-boot-actuators
You could check this out as a ref

@rohanKanojia
Copy link
Member Author

Hi guys, I revisited this and realized I had a misunderstanding regarding /actuator/startup endpoint. It's not related to Kubernetes probes.

In Spring Boot Kubernetes probes documentation, it's clearly stated there is no explicit startup endpoint supported:

If an application takes longer to start than the configured liveness period, Kubernetes mentions the "startupProbe" as a possible solution. The "startupProbe" is not necessarily needed here, as the "readinessProbe" fails until all startup tasks are done.

Really sorry for the noise.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants