diff --git a/images/router/haproxy/conf/haproxy-config.template b/images/router/haproxy/conf/haproxy-config.template index e7f89360c..f8913d426 100644 --- a/images/router/haproxy/conf/haproxy-config.template +++ b/images/router/haproxy/conf/haproxy-config.template @@ -605,6 +605,9 @@ backend {{ genBackendNamePrefix $cfg.TLSTermination }}:{{ $cfgIdx }} {{- end }} {{- end }} tcp-request content reject if !allowlist + {{- end }} + {{- with $value := clipHAProxyTimeoutValue (firstMatch $timeSpecPattern (index $cfg.Annotations "haproxy.router.openshift.io/timeout-http-keep-alive")) }} + timeout http-keep-alive {{ $value }} {{- end }} {{- with $value := clipHAProxyTimeoutValue (firstMatch $timeSpecPattern (index $cfg.Annotations "haproxy.router.openshift.io/timeout")) }} timeout server {{ $value }} diff --git a/pkg/router/template/configmanager/haproxy/manager.go b/pkg/router/template/configmanager/haproxy/manager.go index 86e3a0886..d1a8643a8 100644 --- a/pkg/router/template/configmanager/haproxy/manager.go +++ b/pkg/router/template/configmanager/haproxy/manager.go @@ -1112,5 +1112,6 @@ func modAnnotationsList(termination routev1.TLSTerminationType) []string { annotations = append(annotations, "haproxy.router.openshift.io/hsts_header") annotations = append(annotations, "haproxy.router.openshift.io/rewrite-target") annotations = append(annotations, "router.openshift.io/cookie-same-site") + annotations = append(annotations, "haproxy.router.openshift.io/timeout-http-keep-alive") return annotations }