spring-boot
spring-boot copied to clipboard
Improve Kubernetes liveness and readiness probes customization documentation
Hi, when I was looking into docs how to customize k8s liveness and readiness probes, I was not able to find it explicitly how to do it. This PR add tests and improves documentation little bit. What do you think? Thx Ivos
I suppose you are talking about this section:

I found it, but there is group-name equal to live, but AvailabilityProbesHealthEndpointGroups is registering liveness and readiness groups.
I understand docs from screenshot, that I can create group-name with any name. What I want to achive is to customize those automatic /livez and /readyz endpoints automatically added by management.endpoint.health.probes.add-additional-paths flag.
Do I understand it correctly?
Anyways, I am also not keen to duplicate the stuff :)
edit: I have added test ManagementPortAvailabilityProbesCustomPathWithoutFlagEnabledTests to show that when I register additional-paths with same group name liveness & readiness, it does not matter if I enable or disable management.endpoint.health.probes.add-additional-paths flag.
Yes, you understand it correctly. The probes documentation notes that the probes are implemented as health groups:
They are also exposed as separate HTTP Probes by using health groups: "/actuator/health/liveness" and "/actuator/health/readiness"
And the documentation on health groups to which it links describes how to customise the additional paths of any health group. This is the section in your screenshot above.
I have changed wordings and added link to groups docs. What do you think?
tests fixed, rebased to recent upstream/main
We'd like to make the change to the documentation. We don't feel the tests are necessary as we think we have sufficient coverage elsewhere.
Thanks very much @bedla, this is now in 2.7.x and merged forwards to all supported branches.