Add min_successes

This commit is contained in:
Francis Lavoie 2023-04-15 08:44:12 -04:00
parent c8b8c3a7b2
commit 2c61b50b5f
No known key found for this signature in database
GPG key ID: 0F66EE1687682239
3 changed files with 29 additions and 0 deletions

View file

@ -352,6 +352,10 @@ func (h *Handler) Provision(ctx caddy.Context) error {
if h.HealthChecks.Passive.FailDuration > 0 && h.HealthChecks.Passive.MaxFails == 0 {
h.HealthChecks.Passive.MaxFails = 1
}
if h.HealthChecks.Passive.MinSuccessRatio > 0 && h.HealthChecks.Passive.MinSuccesses == 0 {
h.HealthChecks.Passive.MinSuccesses = 5
}
}
// if active health checks are enabled, configure them and start a worker