Enable loadbalancer.sticky for Consul Catalog
This commit is contained in:
parent
e6c2040ea8
commit
8105f1c379
1 changed files with 2 additions and 4 deletions
|
@ -18,11 +18,9 @@
|
||||||
expression = "{{$circuitBreaker}}"
|
expression = "{{$circuitBreaker}}"
|
||||||
{{end}}
|
{{end}}
|
||||||
|
|
||||||
{{$loadBalancer := getAttribute "backend.loadbalancer" .Attributes ""}}
|
|
||||||
{{with $loadBalancer}}
|
|
||||||
[backends."backend-{{$service}}".loadbalancer]
|
[backends."backend-{{$service}}".loadbalancer]
|
||||||
method = "{{$loadBalancer}}"
|
sticky = {{getAttribute "backend.loadbalancer.sticky" .Attributes "false"}}
|
||||||
{{end}}
|
method = "{{getAttribute "backend.loadbalancer" .Attributes "wrr"}}"
|
||||||
|
|
||||||
{{if hasMaxconnAttributes .Attributes}}
|
{{if hasMaxconnAttributes .Attributes}}
|
||||||
[backends."backend-{{$service}}".maxconn]
|
[backends."backend-{{$service}}".maxconn]
|
||||||
|
|
Loading…
Reference in a new issue