Add log when missing path in health check
This commit is contained in:
parent
5c15f5fe04
commit
23340c46e6
2 changed files with 14 additions and 9 deletions
|
@ -311,12 +311,17 @@ func (m *Manager) LaunchHealthCheck() {
|
|||
}
|
||||
|
||||
func buildHealthCheckOptions(ctx context.Context, lb healthcheck.Balancer, backend string, hc *dynamic.ServerHealthCheck) *healthcheck.Options {
|
||||
if hc == nil || hc.Path == "" {
|
||||
if hc == nil {
|
||||
return nil
|
||||
}
|
||||
|
||||
logger := log.FromContext(ctx)
|
||||
|
||||
if hc.Path == "" {
|
||||
logger.Errorf("Ignoring heath check configuration for '%s': no path provided", backend)
|
||||
return nil
|
||||
}
|
||||
|
||||
interval := defaultHealthCheckInterval
|
||||
if hc.Interval != "" {
|
||||
intervalOverride, err := time.ParseDuration(hc.Interval)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue