summaryrefslogtreecommitdiff
path: root/data/templates/load-balancing
diff options
context:
space:
mode:
authormergify[bot] <37929162+mergify[bot]@users.noreply.github.com>2024-06-03 13:57:58 +0300
committerGitHub <noreply@github.com>2024-06-03 13:57:58 +0300
commitd2d8dd1de6e52b7835a0030f42f808433282eea8 (patch)
tree806d23fbe0a233be8b74811b04386fbf09811198 /data/templates/load-balancing
parentc6a8522c4c20078bb33157fc803373bf3532a02b (diff)
downloadvyos-1x-d2d8dd1de6e52b7835a0030f42f808433282eea8.tar.gz
vyos-1x-d2d8dd1de6e52b7835a0030f42f808433282eea8.zip
reverse-proxy: T6434: Support additional healthcheck options (#3574) (#3577)
(cherry picked from commit 3e5cc0b7fb8ae4a0f8b7c9270d9db0a0f252c448) Co-authored-by: Alex W <embezzle.dev@proton.me>
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 %}