updated haproxy state

This commit is contained in:
Paul 2025-02-23 19:07:20 +01:00
parent a505b7877c
commit f3c19b26b7

View File

@ -159,8 +159,11 @@ cache static
frontend fe_http from {{ haproxy.config.namespace }}
bind *:{{ haproxy.config.http_port }},:::{{ haproxy.config.http_port }} v4v6 name http
mode http
option httplog clf
option http-buffer-request
option tcpka
monitor-uri /dead_or_alive
unique-id-format "%{+X}o %ci:%cp_%fi:%fp_%Ts_%rt:%pid"
{% for name, service in haproxy.config.spoe.items() %}
@ -223,8 +226,11 @@ frontend fe_https from {{ haproxy.config.namespace }}
{%- endif %}
bind *:{{ haproxy.config.https_port }},:::{{ haproxy.config.https_port }} v4v6 ssl crt {{ haproxy.config.acme_fullchains_dir }}{% if haproxy.config.http2 %} alpn h2,http/1.1{% endif %} name https
mode http
option httplog clf
option http-buffer-request
option tcpka
monitor-uri /dead_or_alive
unique-id-format "%{+X}o %ci:%cp_%fi:%fp_%Ts_%rt:%pid"
{% for name, service in haproxy.config.spoe.items() %}
@ -314,7 +320,10 @@ frontend fe_https from {{ haproxy.config.namespace }}
backend {{ name }} from {{ haproxy.config.namespace }}
balance {{ values.balance|default(haproxy.config.balance) }}
mode http
option forwardfor
option tcpka
{%- if values.check|default(haproxy.config.check) %}
option httpchk
{%- for step in values.check_steps|default([]) %}
@ -354,8 +363,10 @@ backend {{ name }} from {{ haproxy.config.namespace }}
listen {{ name }} from {{ haproxy.config.namespace }}
bind *:{{ values.port }},:::{{ values.port }} v4v6 name {{ name }}
mode tcp
option tcplog
option tcpka
stick-table type ip size 10k peers paulbsd
stick on dst
{%- if values.type == "postgres" %}
@ -375,9 +386,13 @@ listen {{ name }} from {{ haproxy.config.namespace }}
{%- for name, values in haproxy.config.spoe.items() %}
backend {{ name }} from {{ haproxy.config.namespace }}
mode tcp
timeout connect 5s
timeout server 3m
option spop-check
option tcpka
default-server maxconn 100 weight 100 inter 1s fall 5 agent-check agent-port 7265 agent-send "{{ name }}\n"
{{- tcpendpoints(servers=values.servers, check=values.check|default(haproxy.config.check)) }}
{% endfor %}