summaryrefslogtreecommitdiff
path: root/data
diff options
context:
space:
mode:
authorViacheslav Hletenko <v.gletenko@vyos.io>2025-02-22 15:44:34 +0000
committerViacheslav Hletenko <v.gletenko@vyos.io>2025-02-24 10:28:33 +0000
commitfe20eae99ebdb7781f74ada3a7c13a848ea75bcc (patch)
tree987fea738165fdc67ea9d2ca58ffb33c1b0660ac /data
parent5d9d232fd93ad5bf89ba44a2d0ec3b196599fa74 (diff)
downloadvyos-1x-fe20eae99ebdb7781f74ada3a7c13a848ea75bcc.tar.gz
vyos-1x-fe20eae99ebdb7781f74ada3a7c13a848ea75bcc.zip
T7190: Add haproxy default timeout options configurable
Add the ability to configurate default timeout and frontend client timeout ``` set load-balancing haproxy service web timeout client '600' set load-balancing haproxy timeout check '4' set load-balancing haproxy timeout client '600' set load-balancing haproxy timeout connect '12' set load-balancing haproxy timeout server '120' ```
Diffstat (limited to 'data')
-rw-r--r--data/templates/load-balancing/haproxy.cfg.j212
1 files changed, 9 insertions, 3 deletions
diff --git a/data/templates/load-balancing/haproxy.cfg.j2 b/data/templates/load-balancing/haproxy.cfg.j2
index c98b739e2..70ea5d2b0 100644
--- a/data/templates/load-balancing/haproxy.cfg.j2
+++ b/data/templates/load-balancing/haproxy.cfg.j2
@@ -38,9 +38,10 @@ defaults
log global
mode http
option dontlognull
- timeout connect 10s
- timeout client 50s
- timeout server 50s
+ timeout check {{ timeout.check }}s
+ timeout connect {{ timeout.connect }}s
+ timeout client {{ timeout.client }}s
+ timeout server {{ timeout.server }}s
errorfile 400 /etc/haproxy/errors/400.http
errorfile 403 /etc/haproxy/errors/403.http
errorfile 408 /etc/haproxy/errors/408.http
@@ -134,6 +135,11 @@ frontend {{ front }}
default_backend {{ backend }}
{% endfor %}
{% endif %}
+{% if front_config.timeout is vyos_defined %}
+{% if front_config.timeout.client is vyos_defined %}
+ timeout client {{ front_config.timeout.client }}s
+{% endif %}
+{% endif %}
{% endfor %}
{% endif %}