net/haproxy: do not duplicate global defaults anymore, closes #2642

This commit is contained in:
Frank Wall
2023-01-12 21:26:06 +01:00
parent f9e325e882
commit 251c1261a9
2 changed files with 3 additions and 10 deletions
+1
View File
@@ -17,6 +17,7 @@ Changed:
* rename frontend option "Type" to "Connection Mode" (#3026)
* migrate options "http-tunnel" and "forceclose" to "http-keep-alive" (#3026)
* replace "process" with "threads" bind keyword for CPU Affinity (#3026)
* no longer duplicate global defaults in backends/frontends (#2642)
Removed:
* remove Processes/nbproc option (use Threads/nbthread instead) (#3026)
@@ -1429,14 +1429,12 @@ frontend {{frontend.name}}
{% if frontend.prometheus_enabled == '1' and frontend.mode == 'http' and frontend.prometheus_path|default("") != "" %}
http-request use-service prometheus-exporter if { path {{frontend.prometheus_path}} }
{% endif %}
# tuning options
{# # tuning options #}
{% if frontend.tuning_maxConnections is defined %}
maxconn {{frontend.tuning_maxConnections}}
{% endif %}
{% if frontend.tuning_timeoutClient is defined %}
timeout client {{frontend.tuning_timeoutClient}}
{% elif OPNsense.HAProxy.general.defaults.timeoutClient is defined %}
timeout client {{OPNsense.HAProxy.general.defaults.timeoutClient}}
{% endif %}
{% if frontend.tuning_timeoutHttpReq|default("") != "" and frontend.mode == 'http' %}
timeout http-request {{frontend.tuning_timeoutHttpReq}}
@@ -1653,21 +1651,15 @@ backend {{backend.name}}
{% endif %}
{# # call macro to evaluate stickiness config #}
{{ StickTableConfig(backend,true) }}
# tuning options
{# # tuning options #}
{% if backend.tuning_timeoutConnect|default("") != "" %}
timeout connect {{backend.tuning_timeoutConnect}}
{% elif OPNsense.HAProxy.general.defaults.timeoutConnect is defined %}
timeout connect {{OPNsense.HAProxy.general.defaults.timeoutConnect}}
{% endif %}
{% if backend.tuning_timeoutCheck|default("") != "" %}
timeout check {{backend.tuning_timeoutCheck}}
{% elif OPNsense.HAProxy.general.defaults.timeoutCheck is defined %}
timeout check {{OPNsense.HAProxy.general.defaults.timeoutCheck}}
{% endif %}
{% if backend.tuning_timeoutServer|default("") != "" %}
timeout server {{backend.tuning_timeoutServer}}
{% elif OPNsense.HAProxy.general.defaults.timeoutServer is defined %}
timeout server {{OPNsense.HAProxy.general.defaults.timeoutServer}}
{% endif %}
{% if backend.tuning_retries|default("") != "" %}
retries {{backend.tuning_retries}}