summaryrefslogtreecommitdiff
path: root/data/templates/load-balancing
diff options
context:
space:
mode:
authorAlex W <embezzle.dev@proton.me>2024-06-03 05:54:07 +0100
committerGitHub <noreply@github.com>2024-06-03 07:54:07 +0300
commit3e5cc0b7fb8ae4a0f8b7c9270d9db0a0f252c448 (patch)
tree96f60d89562759d3ae9c9eeec2e6740c82121b99 /data/templates/load-balancing
parentd150067ef254a266aef2758e8e92b43c1f22956b (diff)
downloadvyos-1x-3e5cc0b7fb8ae4a0f8b7c9270d9db0a0f252c448.tar.gz
vyos-1x-3e5cc0b7fb8ae4a0f8b7c9270d9db0a0f252c448.zip
reverse-proxy: T6434: Support additional healthcheck options (#3574)
Diffstat (limited to 'data/templates/load-balancing')
-rw-r--r--data/templates/load-balancing/haproxy.cfg.j27
1 files changed, 7 insertions, 0 deletions
diff --git a/data/templates/load-balancing/haproxy.cfg.j2 b/data/templates/load-balancing/haproxy.cfg.j2
index b786a58f8..c6027e09b 100644
--- a/data/templates/load-balancing/haproxy.cfg.j2
+++ b/data/templates/load-balancing/haproxy.cfg.j2
@@ -131,6 +131,13 @@ frontend {{ front }}
{% if backend is vyos_defined %}
{% for back, back_config in backend.items() %}
backend {{ back }}
+{% if back_config.health_check is vyos_defined %}
+{% if back_config.health_check == 'smtp' %}
+ option smtpchk
+{% else %}
+ option {{ back_config.health_check }}-check
+{% endif %}
+{% endif %}
{% if back_config.http_check is vyos_defined %}
option httpchk
{% endif %}