configuring load balancing per ingress (#2167)
* configure load balancing through a ingress annotation * update docs
This commit is contained in:
parent
4a49d67adc
commit
36cce00fdd
11 changed files with 156 additions and 10 deletions
|
|
@ -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 }};
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue