diff --git a/main.go b/main.go index 2d26a98..28026c2 100644 --- a/main.go +++ b/main.go @@ -33,7 +33,7 @@ type Backend struct { Mode string CookieName string CookieFlags string - HealthCheck bool + HealthCheck string ServerOptions string Servers []BackendServer } @@ -208,8 +208,10 @@ func main() { if val, ok := ann["haproxy/cookie-flags"]; ok && val != "" { b.CookieFlags = val } - if val, ok := ann["haproxy/health-check"]; ok && strings.ToLower(val) == "false" { - b.HealthCheck = false + if val, ok := ann["haproxy/health-check"]; ok && val != "" { + b.HealthCheck = val + } else { + b.HealthCheck = "" } if val, ok := ann["haproxy/server-options"]; ok && val != "" { b.ServerOptions = val