Skip to content

Commit d107ca8

Browse files
Merge pull request #20702 from ramr/fix-tcp-balance-scheme
Fix router issue to use tcp balance scheme if configured
2 parents 305555a + e22a22d commit d107ca8

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

images/router/haproxy/conf/haproxy-config.template

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -511,7 +511,7 @@ backend {{genBackendNamePrefix $cfg.TLSTermination}}:{{$cfgIdx}}
511511
{{- if ne (env "ROUTER_SYSLOG_ADDRESS") ""}}
512512
option tcplog
513513
{{- end }}
514-
{{- with $balanceAlgo := firstMatch "roundrobin|leastconn|source" (index $cfg.Annotations "haproxy.router.openshift.io/balance") (env "ROUTER_LOAD_BALANCE_ALGORITHM") }}
514+
{{- with $balanceAlgo := firstMatch "roundrobin|leastconn|source" (index $cfg.Annotations "haproxy.router.openshift.io/balance") (env "ROUTER_TCP_BALANCE_SCHEME" (env "ROUTER_LOAD_BALANCE_ALGORITHM")) }}
515515
balance {{ $balanceAlgo }}
516516
{{- else }}
517517
balance {{ if gt $cfg.ActiveServiceUnits 1 }}roundrobin{{ else }}source{{ end }}

0 commit comments

Comments
 (0)