Add health check label to ECS

This commit is contained in:
Tait Clarridge 2017-11-21 05:06:03 -05:00 committed by Traefiker
parent 4b91204686
commit 6d2f4a0813
7 changed files with 111 additions and 26 deletions

View file

@ -1019,6 +1019,7 @@ func (server *Server) loadConfig(configurations types.Configurations, globalConf
hcOpts := parseHealthCheckOptions(rebalancer, frontend.Backend, config.Backends[frontend.Backend].HealthCheck, globalConfiguration.HealthCheck)
if hcOpts != nil {
log.Debugf("Setting up backend health check %s", *hcOpts)
hcOpts.Transport = server.defaultForwardingRoundTripper
backendsHealthCheck[entryPointName+frontend.Backend] = healthcheck.NewBackendHealthCheck(*hcOpts)
}
lb = middlewares.NewEmptyBackendHandler(rebalancer, lb)
@ -1040,6 +1041,7 @@ func (server *Server) loadConfig(configurations types.Configurations, globalConf
hcOpts := parseHealthCheckOptions(rr, frontend.Backend, config.Backends[frontend.Backend].HealthCheck, globalConfiguration.HealthCheck)
if hcOpts != nil {
log.Debugf("Setting up backend health check %s", *hcOpts)
hcOpts.Transport = server.defaultForwardingRoundTripper
backendsHealthCheck[entryPointName+frontend.Backend] = healthcheck.NewBackendHealthCheck(*hcOpts)
}
lb = middlewares.NewEmptyBackendHandler(rr, lb)