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

Improve Kubernetes liveness and readiness probes customization documentation #34978

Conversation

bedla
Copy link
Contributor

@bedla bedla commented Apr 13, 2023

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

@spring-projects-issues spring-projects-issues added the status: waiting-for-triage An issue we've not yet triaged label Apr 13, 2023
Copy link
Member

@wilkinsona wilkinsona left a comment

Choose a reason for hiding this comment

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

Thanks for the proposal. Configuring an additional path is already documented and we link to this documentation from the introduction of the section on probes. I'm not too keen on duplicating information between the two sections. Perhaps we could add another cross-reference instead?

@wilkinsona wilkinsona added the status: waiting-for-feedback We need additional information before we can continue label Apr 13, 2023
@bedla
Copy link
Contributor Author

bedla commented Apr 13, 2023

I suppose you are talking about this section:
image

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.

@spring-projects-issues spring-projects-issues added the status: feedback-provided Feedback has been provided label Apr 13, 2023
@bedla bedla force-pushed the document-liveness-readiness-probes-customization branch from a8e9060 to 4432dc0 Compare April 13, 2023 19:24
@spring-projects-issues spring-projects-issues removed the status: waiting-for-feedback We need additional information before we can continue label Apr 13, 2023
@bedla bedla force-pushed the document-liveness-readiness-probes-customization branch from 4432dc0 to 20e3262 Compare April 14, 2023 04:17
@wilkinsona
Copy link
Member

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.

@wilkinsona wilkinsona added status: waiting-for-feedback We need additional information before we can continue and removed status: feedback-provided Feedback has been provided labels Apr 14, 2023
@bedla bedla force-pushed the document-liveness-readiness-probes-customization branch from 20e3262 to 8e698b1 Compare April 16, 2023 19:27
@bedla
Copy link
Contributor Author

bedla commented Apr 16, 2023

I have changed wordings and added link to groups docs. What do you think?

@spring-projects-issues spring-projects-issues added status: feedback-provided Feedback has been provided and removed status: waiting-for-feedback We need additional information before we can continue labels Apr 16, 2023
…ntation

Add tests for liveness and readiness probes
@bedla bedla force-pushed the document-liveness-readiness-probes-customization branch from 8e698b1 to a2bea45 Compare April 20, 2023 19:53
@bedla
Copy link
Contributor Author

bedla commented Apr 20, 2023

tests fixed, rebased to recent upstream/main

@philwebb philwebb added the for: team-meeting An issue we'd like to discuss as a team to make progress label Jun 6, 2023
@philwebb philwebb added for: merge-with-amendments Needs some changes when we merge type: documentation A documentation update and removed status: waiting-for-triage An issue we've not yet triaged status: feedback-provided Feedback has been provided for: team-meeting An issue we'd like to discuss as a team to make progress labels Jun 14, 2023
@philwebb philwebb added this to the 2.7.x milestone Jun 14, 2023
@wilkinsona
Copy link
Member

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.

@philwebb
Copy link
Member

philwebb commented Jul 4, 2023

Thanks very much @bedla, this is now in 2.7.x and merged forwards to all supported branches.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
for: merge-with-amendments Needs some changes when we merge type: documentation A documentation update
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants