Introduce Sticky health indicator #16275
Closed
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Hi,
We have lots of microservices running in K8s on production and and we use their /health endpoints to check whether everything is OK or not. Sometimes we have issues that that some health dependency gets broken (for example a temporal problem with a database) and the whole health of the service goes DOWN. This is the desired behaviour for most of the health indicators, but for some of them a DOWN health indicator should not stop traffic coming to the service, as the dependency might not be very important. But I would still like to have those health indicators, so that at least on startup I can be sure that some connection and credentials are defined correct.
The idea behind this PR is to be able to define a list of those special health indicators with some configuration like this:
management.health.status.sticky[0]=myindicator
. Sticky health indicator must get UP at least once (on startup), and then it will always stay UP. In case the original health indicator goes to DOWN or any other, the status is still shown UP, but original status and original details are provided inside the details.I can add more tests and reactive health indicators support if needed.
WDYT?