From 0291b6367ddffa3e1d3559f203ca8796a4e97b87 Mon Sep 17 00:00:00 2001 From: Andrey Lebedev Date: Tue, 7 Nov 2023 21:12:33 +0100 Subject: [PATCH] OCPBUGS-14914: set the tunnel timeout only on the backend level --- images/router/haproxy/conf/haproxy-config.template | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/images/router/haproxy/conf/haproxy-config.template b/images/router/haproxy/conf/haproxy-config.template index 797db3226..0cf5f1308 100644 --- a/images/router/haproxy/conf/haproxy-config.template +++ b/images/router/haproxy/conf/haproxy-config.template @@ -163,9 +163,6 @@ defaults timeout http-request {{ firstMatch $timeSpecPattern (env "ROUTER_SLOWLORIS_TIMEOUT") "10s" }} timeout http-keep-alive {{ firstMatch $timeSpecPattern (env "ROUTER_SLOWLORIS_HTTP_KEEPALIVE") "300s" }} - # Long timeout for WebSocket connections. - timeout tunnel {{ firstMatch $timeSpecPattern (env "ROUTER_DEFAULT_TUNNEL_TIMEOUT") "1h" }} - {{- if isTrue (env "ROUTER_ENABLE_COMPRESSION") }} compression algo gzip compression type {{ env "ROUTER_COMPRESSION_MIME" "text/html text/plain text/css" }} @@ -586,6 +583,8 @@ backend {{ genBackendNamePrefix $cfg.TLSTermination }}:{{ $cfgIdx }} {{- end }} {{- with $value := clipHAProxyTimeoutValue (firstMatch $timeSpecPattern (index $cfg.Annotations "haproxy.router.openshift.io/timeout-tunnel")) }} timeout tunnel {{ $value }} + {{- else }} + timeout tunnel {{ firstMatch $timeSpecPattern (env "ROUTER_DEFAULT_TUNNEL_TIMEOUT") "1h" }} {{- end }} {{- if isTrue (index $cfg.Annotations "haproxy.router.openshift.io/rate-limit-connections") }}