1
0
Fork 0

Add passive health checks

This commit is contained in:
Nelson Isioma 2025-08-21 10:40:06 +01:00 committed by GitHub
parent c20802b07e
commit fc0fac8543
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
20 changed files with 696 additions and 6 deletions

View file

@ -392,6 +392,21 @@ func (c configBuilder) buildServersLB(namespace string, svc traefikv1alpha1.Load
}
}
if svc.PassiveHealthCheck != nil {
lb.PassiveHealthCheck = &dynamic.PassiveServerHealthCheck{}
lb.PassiveHealthCheck.SetDefaults()
if svc.PassiveHealthCheck.MaxFailedAttempts != nil {
lb.PassiveHealthCheck.MaxFailedAttempts = *svc.PassiveHealthCheck.MaxFailedAttempts
}
if svc.PassiveHealthCheck.FailureWindow != nil {
if err := lb.PassiveHealthCheck.FailureWindow.Set(svc.PassiveHealthCheck.FailureWindow.String()); err != nil {
return nil, err
}
}
}
conf := svc
lb.PassHostHeader = conf.PassHostHeader
if lb.PassHostHeader == nil {