@@ -153,7 +153,7 @@ backend be_sni
153
153
154
154
frontend fe_sni
155
155
# terminate ssl on edge
156
- bind 127.0.0.1:{{env "ROUTER_SERVICE_SNI_PORT" "10444"}} ssl no-sslv3 {{ if (len .DefaultCertificate) gt 0 }}crt {{.DefaultCertificate}}{{ else }}crt /var/lib/haproxy/conf/default_pub_keys.pem{{ end }} crt-list /var/lib/haproxy/conf/cert_config.map accept-proxy
156
+ bind 127.0.0.1:{{env "ROUTER_SERVICE_SNI_PORT" "10444"}} ssl no-sslv3 {{ if gt (len .DefaultCertificate) 0 }}crt {{.DefaultCertificate}}{{ else }}crt /var/lib/haproxy/conf/default_pub_keys.pem{{ end }} crt-list /var/lib/haproxy/conf/cert_config.map accept-proxy
157
157
mode http
158
158
159
159
# check re-encrypt backends first - from most specific to general path.
@@ -187,7 +187,7 @@ backend be_no_sni
187
187
188
188
frontend fe_no_sni
189
189
# terminate ssl on edge
190
- bind 127.0.0.1:{{env "ROUTER_SERVICE_NO_SNI_PORT" "10443"}} ssl no-sslv3 {{ if (len .DefaultCertificate) gt 0 }}crt {{.DefaultCertificate}}{{ else }}crt /var/lib/haproxy/conf/default_pub_keys.pem{{ end }} accept-proxy
190
+ bind 127.0.0.1:{{env "ROUTER_SERVICE_NO_SNI_PORT" "10443"}} ssl no-sslv3 {{ if gt (len .DefaultCertificate) 0 }}crt {{.DefaultCertificate}}{{ else }}crt /var/lib/haproxy/conf/default_pub_keys.pem{{ end }} accept-proxy
191
191
mode http
192
192
193
193
# check re-encrypt backends first - path or host based.
@@ -255,7 +255,7 @@ backend be_edge_http_{{$cfgIdx}}
255
255
{{ if (matchPattern "roundrobin|leastconn|source" (env "ROUTER_LOAD_BALANCE_ALGORITHM" "")) }}
256
256
balance {{ env "ROUTER_LOAD_BALANCE_ALGORITHM" "leastconn"}}
257
257
{{ else }}
258
- balance leastconn
258
+ balance {{ if gt (len $cfg.ServiceUnitNames) 1 }}roundrobin{{ else }} leastconn{{ end }}
259
259
{{ end }}
260
260
{{ end }}
261
261
{{ with $value := index $cfg.Annotations "haproxy.router.openshift.io/timeout"}}
@@ -337,7 +337,11 @@ backend be_tcp_{{$cfgIdx}}
337
337
balance {{ $balanceAlgo }}
338
338
{{ end }}
339
339
{{ else }}
340
- balance {{ env "ROUTER_TCP_BALANCE_SCHEME" "source" }}
340
+ {{ if (matchPattern "roundrobin|leastconn|source" (env "ROUTER_TCP_BALANCE_SCHEME" "")) }}
341
+ balance {{ env "ROUTER_TCP_BALANCE_SCHEME" "source"}}
342
+ {{ else }}
343
+ balance {{ if gt (len $cfg.ServiceUnitNames) 1 }}roundrobin{{ else }}source{{ end }}
344
+ {{ end }}
341
345
{{ end }}
342
346
{{ with $value := index $cfg.Annotations "haproxy.router.openshift.io/timeout"}}
343
347
{{if (matchPattern "[1-9][0-9]*(us|ms|s|m|h|d)?" $value) }}
@@ -403,7 +407,7 @@ backend be_secure_{{$cfgIdx}}
403
407
{{ if (matchPattern "roundrobin|leastconn|source" (env "ROUTER_LOAD_BALANCE_ALGORITHM" "")) }}
404
408
balance {{ env "ROUTER_LOAD_BALANCE_ALGORITHM" "leastconn"}}
405
409
{{ else }}
406
- balance leastconn
410
+ balance {{ if gt (len $cfg.ServiceUnitNames) 1 }}roundrobin{{ else }} leastconn{{ end }}
407
411
{{ end }}
408
412
{{ end }}
409
413
{{ with $value := index $cfg.Annotations "haproxy.router.openshift.io/timeout"}}
0 commit comments