-
Notifications
You must be signed in to change notification settings - Fork 523
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 should auto detect configured liveness and readiness probes #2665
Comments
@manusa / @rohanKanojia : I am willing to pick this up if it is available for contributors. Kindly assign this to me. |
@l3002 : We need to figure out what property gets set whenever probes are enabled, also is the behavior the same when Spring boot configuration is provided in the form of Are you okay with investigating this part first and then sharing your findings? |
yeah, not a problem from my end. I'll share my investigation findings before implementing anything. |
@manusa / @rohanKanojia, I'm sorry I haven't been able to get to this for a while, I've been cramped up with work from my day job. I'll try to propose a solution for this by the end of next week. I hope that's fine. |
Hi @manusa / @rohanKanojia: After doing a bit research on the topic, I'm unable to understand the point of changing the endpoints with the explicit actuator endpoint. Correct me if I'm wrong that we require Both the global endpoint But If this still holds some importance then I guess we just need to set the value for |
Path to documentation https://docs.spring.io/spring-boot/docs/current/reference/html/actuator.html#actuator.endpoints.kubernetes-probes We don't know if the user has customized the health checks with specific checks for readiness and liveness (which are different concepts, Kubernetes acts differently upon failure of the probe -liveness failure triggers restart, readiness failure isolates the pod for a period until healthy.). It's important that we respect this and that we define the probe as per the specific endpoints instead of the global endpoint. |
Okay, I understand it now. So then, I guess it would be better to completely replace the global endpoint with two separate specific endpoints for liveness and readiness. Would that be fine? |
We should give precedence to specific endpoints when we detect user has explicitly configured them. Otherwise, we can stick to current behavior. |
Hi @manusa / @rohanKanojia, I'm really sorry, I haven't been able to give this issue a considerable amount of time. Though, I do have a plan to implement this through by adding two additional constants to |
@l3002 : polite ping, Did you get any time to revisit this issue? If not, shall I unassign you from this issue? |
@rohanKanojia: I'm still working on this, I'm trying to figure out, All the places where the changes are needed, after changing the As this is a part of enhancement, I'm trying to be as cautious as possible. Just don't want to accidently break anything, this is a pretty big issue for me. |
I think my original motivation behind creating this issue was to auto detect this configuration. I didn't mean to add a new configuration option for this. Let me try to explain step by step what needs to be done:
|
@rohanKanojia : Oh, okay. I thought of creating the two separate Thanks for your insight. I'll try to implement this in code and test the result this week and update. |
@manusa / @rohanKanojia : Wanted to give both of you an update, I've implemented the changes and now, I'm working on Unit Tests for the same. |
…kube#2665 Signed-off-by: Marc Nuri <[email protected]>
Signed-off-by: Marc Nuri <[email protected]>
…kEnricher detects management health probe endpoints Related to eclipse-jkube#2665 Add gradle integration test to verify that SpringBootHealthCheckEnricher adds `/actuator/health/readiness` for readiness probe and `/actuator/health/liveness` for liveness probe when `management.health.probes.enabled` property is enabled in application.properties Signed-off-by: Rohan Kumar <[email protected]>
…kEnricher detects management health probe endpoints Related to eclipse-jkube#2665 Add gradle integration test to verify that SpringBootHealthCheckEnricher adds `/actuator/health/readiness` for readiness probe and `/actuator/health/liveness` for liveness probe when `management.health.probes.enabled` property is enabled in application.properties Signed-off-by: Rohan Kumar <[email protected]>
…kEnricher detects management health probe endpoints Related to eclipse-jkube#2665 Add gradle integration test to verify that SpringBootHealthCheckEnricher adds `/actuator/health/readiness` for readiness probe and `/actuator/health/liveness` for liveness probe when `management.health.probes.enabled` property is enabled in application.properties Signed-off-by: Rohan Kumar <[email protected]>
…detects management health probe endpoints Related to #2665 Add gradle integration test to verify that SpringBootHealthCheckEnricher adds `/actuator/health/readiness` for readiness probe and `/actuator/health/liveness` for liveness probe when `management.health.probes.enabled` property is enabled in application.properties Signed-off-by: Rohan Kumar <[email protected]>
Component
JKube Kit
Is your enhancement related to a problem? Please describe
Description
Originally posted by @adriannowak in Gitter thread
When user configures Spring Boot to enable liveness and readiness probes via application.properties:
management.health.probes.enabled=true
It enables
/actuator/health/liveness
and/actuator/health/readiness
endpoints. However SpringBootHealthCheckEnricher still generates liveness and readiness probes with/actuator/health
value:$ mvn k8s:resource $ cat target/classes/META-INF/jkube/kubernetes.yml | grep -A4 Probe livenessProbe: failureThreshold: 3 httpGet: path: /actuator/health port: 8080 -- readinessProbe: failureThreshold: 3 httpGet: path: /actuator/health port: 8080
Describe the solution you'd like
SpringBootHealthCheckEnricher detects explicit liveness and readiness probes are enabled via checking project configuration.
Describe alternatives you've considered
No response
Additional context
No response
The text was updated successfully, but these errors were encountered: