configuring load balancing per ingress (#2167)

* configure load balancing through a ingress annotation

* update docs
This commit is contained in:
Elvin Efendi 2018-03-09 13:09:41 -08:00 committed by Manuel Alejandro de Brito Fontes
parent 4a49d67adc
commit 36cce00fdd
11 changed files with 156 additions and 10 deletions

View file

@ -321,12 +321,7 @@ http {
{{ end }}
upstream {{ $upstream.Name }} {
{{ if $upstream.UpstreamHashBy }}
hash {{ $upstream.UpstreamHashBy }} consistent;
{{ else }}
# Load balance algorithm; empty for round robin, which is the default
{{ if ne $cfg.LoadBalanceAlgorithm "round_robin" }}{{ $cfg.LoadBalanceAlgorithm }};{{ end }}
{{ end }}
{{ buildLoadBalancingConfig $upstream $cfg.LoadBalanceAlgorithm }}
{{ if (gt $cfg.UpstreamKeepaliveConnections 0) }}
keepalive {{ $cfg.UpstreamKeepaliveConnections }};