Enable loadbalancer.sticky for Consul Catalog

This commit is contained in:
Nicolas Bonneval 2017-08-24 18:38:05 +02:00 committed by Traefiker
parent e6c2040ea8
commit 8105f1c379

View file

@ -18,11 +18,9 @@
expression = "{{$circuitBreaker}}"
{{end}}
{{$loadBalancer := getAttribute "backend.loadbalancer" .Attributes ""}}
{{with $loadBalancer}}
[backends."backend-{{$service}}".loadbalancer]
method = "{{$loadBalancer}}"
{{end}}
sticky = {{getAttribute "backend.loadbalancer.sticky" .Attributes "false"}}
method = "{{getAttribute "backend.loadbalancer" .Attributes "wrr"}}"
{{if hasMaxconnAttributes .Attributes}}
[backends."backend-{{$service}}".maxconn]