2018-10-23 18:29:33 +02:00
|
|
|
global
|
|
|
|
log /dev/log local0
|
|
|
|
log /dev/log local1 notice
|
|
|
|
chroot /var/lib/haproxy
|
|
|
|
stats socket /run/haproxy/admin.sock mode 660 level admin
|
|
|
|
stats timeout 30s
|
|
|
|
user haproxy
|
|
|
|
group haproxy
|
|
|
|
daemon
|
|
|
|
|
|
|
|
defaults
|
|
|
|
log global
|
|
|
|
option dontlognull
|
|
|
|
timeout connect 5000
|
|
|
|
timeout client 50000
|
|
|
|
timeout server 50000
|
|
|
|
|
2024-12-21 19:18:32 +01:00
|
|
|
{% for backend in backends %}
|
|
|
|
backend {{ backend.name }}
|
|
|
|
mode {{ backend.mode }}
|
|
|
|
balance {{ backend.balance }}
|
|
|
|
{% for key, value in backend.labels %}
|
2024-12-21 13:26:53 +01:00
|
|
|
option {{ value }} # {{ key }}
|
|
|
|
{% endfor %
|
2024-12-21 19:18:32 +01:00
|
|
|
cookie {{ backend.mode }} insert indirect nocache
|
|
|
|
{% for server in backend.servers -%}
|
2018-10-23 18:29:33 +02:00
|
|
|
{{ server }}
|
|
|
|
{% endfor %}
|
2024-12-21 13:26:53 +01:00
|
|
|
|
2018-10-23 18:29:33 +02:00
|
|
|
{% endfor %}
|