Skip to content

Commit 8624d24

Browse files
committed
OCPBUGS-14914: set the tunnel timeout only on the backend level
1 parent fb70ac4 commit 8624d24

File tree

1 file changed

+2
-5
lines changed

1 file changed

+2
-5
lines changed

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

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -163,9 +163,6 @@ defaults
163163
timeout http-request {{ firstMatch $timeSpecPattern (env "ROUTER_SLOWLORIS_TIMEOUT") "10s" }}
164164
timeout http-keep-alive {{ firstMatch $timeSpecPattern (env "ROUTER_SLOWLORIS_HTTP_KEEPALIVE") "300s" }}
165165

166-
# Long timeout for WebSocket connections.
167-
timeout tunnel {{ firstMatch $timeSpecPattern (env "ROUTER_DEFAULT_TUNNEL_TIMEOUT") "1h" }}
168-
169166
{{- if isTrue (env "ROUTER_ENABLE_COMPRESSION") }}
170167
compression algo gzip
171168
compression type {{ env "ROUTER_COMPRESSION_MIME" "text/html text/plain text/css" }}
@@ -584,7 +581,7 @@ backend {{ genBackendNamePrefix $cfg.TLSTermination }}:{{ $cfgIdx }}
584581
{{- with $value := clipHAProxyTimeoutValue (firstMatch $timeSpecPattern (index $cfg.Annotations "haproxy.router.openshift.io/timeout")) }}
585582
timeout server {{ $value }}
586583
{{- end }}
587-
{{- with $value := clipHAProxyTimeoutValue (firstMatch $timeSpecPattern (index $cfg.Annotations "haproxy.router.openshift.io/timeout-tunnel")) }}
584+
{{- with $value := clipHAProxyTimeoutValue (firstMatch $timeSpecPattern (index $cfg.Annotations "haproxy.router.openshift.io/timeout-tunnel") (env "ROUTER_DEFAULT_TUNNEL_TIMEOUT") "1h") }}
588585
timeout tunnel {{ $value }}
589586
{{- end }}
590587

@@ -785,7 +782,7 @@ backend {{ genBackendNamePrefix $cfg.TLSTermination }}:{{ $cfgIdx }}
785782
{{- end }}
786783
tcp-request content reject if !whitelist
787784
{{- end }}
788-
{{- with $value := clipHAProxyTimeoutValue (firstMatch $timeSpecPattern (index $cfg.Annotations "haproxy.router.openshift.io/timeout-tunnel") (index $cfg.Annotations "haproxy.router.openshift.io/timeout")) }}
785+
{{- with $value := clipHAProxyTimeoutValue (firstMatch $timeSpecPattern (index $cfg.Annotations "haproxy.router.openshift.io/timeout-tunnel") (index $cfg.Annotations "haproxy.router.openshift.io/timeout")) (env "ROUTER_DEFAULT_TUNNEL_TIMEOUT") "1h" }}
789786
timeout tunnel {{ $value }}
790787
{{- end }}
791788

0 commit comments

Comments
 (0)