File tree 1 file changed +12
-0
lines changed
images/router/haproxy/conf
1 file changed +12
-0
lines changed Original file line number Diff line number Diff line change @@ -252,7 +252,13 @@ backend be_tcp_{{$cfgIdx}}
252
252
{{ if ne (env "ROUTER_SYSLOG_ADDRESS" "") ""}}
253
253
option tcplog
254
254
{{ end }}
255
+ {{ with $balanceAlgo := index $cfg.Annotations "router.openshift.io/haproxy.balance" }}
256
+ {{ with $matchValue := (matchValues $balanceAlgo "roundrobin" "leastconn" ) }}
257
+ balance {{ $balanceAlgo }}
258
+ {{ end }}
259
+ {{ else }}
255
260
balance {{ env "ROUTER_TCP_BALANCE_SCHEME" "source" }}
261
+ {{ end }}
256
262
hash-type consistent
257
263
timeout check 5000ms
258
264
{{ range $serviceUnitName, $weight := $cfg.ServiceUnitNames }}
@@ -269,7 +275,13 @@ backend be_tcp_{{$cfgIdx}}
269
275
backend be_secure_{{$cfgIdx}}
270
276
mode http
271
277
option redispatch
278
+ {{ with $balanceAlgo := index $cfg.Annotations "router.openshift.io/haproxy.balance" }}
279
+ {{ with $matchValue := (matchValues $balanceAlgo "roundrobin" "leastconn" ) }}
280
+ balance {{ $balanceAlgo }}
281
+ {{ end }}
282
+ {{ else }}
272
283
balance leastconn
284
+ {{ end }}
273
285
timeout check 5000ms
274
286
cookie {{$cfg.RoutingKeyName}} insert indirect nocache httponly secure
275
287
{{ range $serviceUnitName, $weight := $cfg.ServiceUnitNames }}
You can’t perform that action at this time.
0 commit comments