[config-server] Allow specification of down health status#2056
Conversation
|
@spencergibb @ryanjbaxter this pull request is for discussion. BTW @spencergibb , I may have spotted an issue in the documentation. Health Indicator section indicates that to disable the health check, you need to set |
Codecov Report
@@ Coverage Diff @@
## main #2056 +/- ##
============================================
- Coverage 77.11% 77.11% -0.01%
- Complexity 1440 1441 +1
============================================
Files 183 183
Lines 5362 5366 +4
Branches 699 699
============================================
+ Hits 4135 4138 +3
- Misses 956 957 +1
Partials 271 271
Continue to review full report at Codecov.
|
ryanjbaxter
left a comment
There was a problem hiding this comment.
Can you add a test that actually uses the property? I don't think it will actually work the way the code is now since there is no setter.
|
|
||
| private Map<String, Repository> repositories = new LinkedHashMap<>(); | ||
|
|
||
| private String downHealthStatus = "DOWN"; |
There was a problem hiding this comment.
I would set this to Status.DOWN.getCode()
|
|
Allow developer to set the property 'spring.cloud.config.server.health.down-health-status' to a custom value
|
@ryanjbaxter thanks |
Allow developer to set the property
spring.cloud.config.server.health.down-health-statusto a custom value. This may be usefull when you make the clone critical (init container for instance), yet want your pod not to be down if your remote is unavailable or cannot be reached; the service will be restricted yet should be seen as alive by the platform.For instance we may use
RESTRICTEDstatus that is used by spring cloud admin to display it in yellow...