mirror of
https://github.com/netbirdio/plugins.git
synced 2026-05-22 18:44:07 -07:00
net/haproxy: add support for init-addr, fixes #1787
This commit is contained in:
@@ -227,6 +227,14 @@
|
||||
<type>dropdown</type>
|
||||
<help><![CDATA[Enable or disable session redistribution in case of connection failure.]]></help>
|
||||
</field>
|
||||
<field>
|
||||
<id>haproxy.general.defaults.init_addr</id>
|
||||
<label>DNS Resolve Order</label>
|
||||
<type>select_multiple</type>
|
||||
<style>tokenize</style>
|
||||
<sortable>true</sortable>
|
||||
<help><![CDATA[Indicates in which order server addresses should be resolved upon startup. Method "last" suggests to pick the address which appears in the state file. Method "libc" uses the libc's internal resolver. Method "none" specifically indicates that the server should start without any valid IP address in a down state. It can be useful to ignore some DNS issues upon startup, waiting for the situation to get fixed later. Defaults to "last,libc".]]></help>
|
||||
</field>
|
||||
<field>
|
||||
<id>haproxy.general.defaults.customOptions</id>
|
||||
<label>Custom options</label>
|
||||
|
||||
@@ -199,6 +199,17 @@
|
||||
<x-3>redispatch on the 3rd retry prior to the last retry</x-3>
|
||||
</OptionValues>
|
||||
</redispatch>
|
||||
<init_addr type="OptionField">
|
||||
<Required>N</Required>
|
||||
<default>last,libc</default>
|
||||
<Multiple>Y</Multiple>
|
||||
<Sorted>Y</Sorted>
|
||||
<OptionValues>
|
||||
<last>last</last>
|
||||
<libc>libc</libc>
|
||||
<none>none</none>
|
||||
</OptionValues>
|
||||
</init_addr>
|
||||
<customOptions type="TextField">
|
||||
<Required>N</Required>
|
||||
</customOptions>
|
||||
|
||||
@@ -933,6 +933,9 @@ defaults
|
||||
{% if OPNsense.HAProxy.general.defaults.retries|default("") != "" %}
|
||||
retries {{OPNsense.HAProxy.general.defaults.retries}}
|
||||
{% endif %}
|
||||
{% if OPNsense.HAProxy.general.defaults.init_addr|default("") != "" %}
|
||||
default-server init-addr {{OPNsense.HAProxy.general.defaults.init_addr}}
|
||||
{% endif %}
|
||||
{% if OPNsense.HAProxy.general.defaults.customOptions|default("") != "" %}
|
||||
# WARNING: pass through options below this line
|
||||
{% for customOpt in OPNsense.HAProxy.general.defaults.customOptions.split("\n") %}
|
||||
|
||||
Reference in New Issue
Block a user