Keep root health check as liveness probe

This commit is contained in:
Sipke Schoorstra 2026-05-21 01:32:03 +02:00
parent a0d6f6b24b
commit 09641c1fab
No known key found for this signature in database
GPG key ID: 5C10502B28A4268F
2 changed files with 3 additions and 0 deletions

View file

@ -49,6 +49,8 @@ app.MapHealthChecks("/health/ready", new()
});
```
The reference server also keeps `/` process-liveness compatible for existing probes by mapping it with `Predicate = _ => false`, the same as `/health/live`. Use `/health/ready` for checks that should return `503` while the runtime is paused, draining, or dependency-degraded.
## Current Elsa Readiness Checks
- `elsa-runtime`: creates a workflow runtime client and reports `Degraded` when the runtime is paused or draining, because it is process-up but not accepting new work.

View file

@ -186,6 +186,7 @@ app.MapHealthChecks("/health/ready", new()
});
app.MapHealthChecks("/", new()
{
Predicate = _ => false,
ResultStatusCodes =
{
[HealthStatus.Degraded] = StatusCodes.Status503ServiceUnavailable,