From 724f0a7d1388a8006f852a23fe8d02d6b1ef7152 Mon Sep 17 00:00:00 2001 From: Ivan Chavero Date: Tue, 24 Oct 2017 18:32:58 -0500 Subject: [PATCH 1/2] Fix duplicate timeout directive When haproxy.router.openshift.io/timeout is set the template is setting the timeout directive twice. Fixes: https://bugzilla.redhat.com/show_bug.cgi?id=1503637 --- images/router/haproxy/conf/haproxy-config.template | 4 ---- 1 file changed, 4 deletions(-) diff --git a/images/router/haproxy/conf/haproxy-config.template b/images/router/haproxy/conf/haproxy-config.template index 19f98c7d462c..14ee88add689 100644 --- a/images/router/haproxy/conf/haproxy-config.template +++ b/images/router/haproxy/conf/haproxy-config.template @@ -346,10 +346,6 @@ backend be_secure:{{$cfgIdx}} timeout server {{$value}} {{- end }} {{/* end balance algorithm setting. */}} - {{- with $value := firstMatch $timeSpecPattern (index $cfg.Annotations "haproxy.router.openshift.io/timeout") }} - timeout server {{$value}} - {{- end }} - {{- if isTrue (index $cfg.Annotations "haproxy.router.openshift.io/rate-limit-connections") }} stick-table type ip size 100k expire 30s store conn_cur,conn_rate(3s),http_req_rate(10s) tcp-request content track-sc2 src From 285296f3f9d2cbbb1ed4d2da9d364d3b719fc04e Mon Sep 17 00:00:00 2001 From: Ivan Chavero Date: Mon, 30 Oct 2017 12:44:54 -0700 Subject: [PATCH 2/2] Fix incorrect comment in template --- images/router/haproxy/conf/haproxy-config.template | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/images/router/haproxy/conf/haproxy-config.template b/images/router/haproxy/conf/haproxy-config.template index 14ee88add689..e3dccb466992 100644 --- a/images/router/haproxy/conf/haproxy-config.template +++ b/images/router/haproxy/conf/haproxy-config.template @@ -344,7 +344,7 @@ backend be_secure:{{$cfgIdx}} {{- end }} {{- with $value := firstMatch $timeSpecPattern (index $cfg.Annotations "haproxy.router.openshift.io/timeout")}} timeout server {{$value}} - {{- end }} {{/* end balance algorithm setting. */}} + {{- end }} {{- if isTrue (index $cfg.Annotations "haproxy.router.openshift.io/rate-limit-connections") }} stick-table type ip size 100k expire 30s store conn_cur,conn_rate(3s),http_req_rate(10s)