mirror of
https://github.com/netbirdio/plugins.git
synced 2026-05-22 18:44:07 -07:00
net/haproxy: add support for additional resolver options (#2560)
* net/haproxy: add support for advanced resolver properties (#2330)
This commit is contained in:
+49
@@ -51,4 +51,53 @@
|
||||
<type>text</type>
|
||||
<help><![CDATA[This configures the default time between two DNS queries, when no valid response has been received. Enter a number followed by one of the supported suffixes "d" (days), "h" (hour), "m" (minute), "s" (seconds), "ms" (miliseconds).]]></help>
|
||||
</field>
|
||||
<field>
|
||||
<id>resolver.accepted_payload_size</id>
|
||||
<label>Max DNS answer size</label>
|
||||
<type>text</type>
|
||||
<help><![CDATA[Defines the maximum payload size accepted by HAProxy and announced to all the name servers configured in this resolvers section. The default is 512 bytes, the maximum allowed is 8192.]]></help>
|
||||
<advanced>true</advanced>
|
||||
</field>
|
||||
<field>
|
||||
<id>resolver.hold_valid</id>
|
||||
<label>Valid hold time</label>
|
||||
<type>text</type>
|
||||
<help><![CDATA[When haproxy receives a valid NS response it will not query DNS until valid time expires. Default is "10s".]]></help>
|
||||
<advanced>true</advanced>
|
||||
</field>
|
||||
<field>
|
||||
<id>resolver.hold_obsolete</id>
|
||||
<label>Obsolete hold time</label>
|
||||
<type>text</type>
|
||||
<help><![CDATA[As a DNS server may not answer all the IPs in one DNS request, haproxy keeps a cache of previous answers. An answer will be considered obsolete after [hold obsolete] seconds without the IP returned. Default is "30s".]]></help>
|
||||
<advanced>true</advanced>
|
||||
</field>
|
||||
<field>
|
||||
<id>resolver.hold_refused</id>
|
||||
<label>Refused hold time</label>
|
||||
<type>text</type>
|
||||
<help><![CDATA[When the DNS server refuses the resolve request haproxy will not retry until [hold refused] elapses. Default "30s".]]></help>
|
||||
<advanced>true</advanced>
|
||||
</field>
|
||||
<field>
|
||||
<id>resolver.hold_nx</id>
|
||||
<label>NX hold time</label>
|
||||
<type>text</type>
|
||||
<help><![CDATA[When haproxy receives a NXDOMAIN error message (domain does not exist) from the resolver it will not retry until [hold nx] elapses. Default "30s".]]></help>
|
||||
<advanced>true</advanced>
|
||||
</field>
|
||||
<field>
|
||||
<id>resolver.hold_timeout</id>
|
||||
<label>Valid hold time</label>
|
||||
<type>text</type>
|
||||
<help><![CDATA[When a DNS resolve request times out haproxy will not retry until [hold timeout] elapses. Default "30s"]]></help>
|
||||
<advanced>true</advanced>
|
||||
</field>
|
||||
<field>
|
||||
<id>resolver.hold_other</id>
|
||||
<label>Other hold time</label>
|
||||
<type>text</type>
|
||||
<help><![CDATA[Sets the "hold other" timeout value for the resolver. Default "30s"]]></help>
|
||||
<advanced>true</advanced>
|
||||
</field>
|
||||
</form>
|
||||
|
||||
@@ -2754,6 +2754,49 @@
|
||||
<ValidationMessage>Should be a number between 1 and 8 characters, optionally followed by either "d", "h", "m", "s", "ms" or "us".</ValidationMessage>
|
||||
<Required>N</Required>
|
||||
</timeout_retry>
|
||||
<accepted_payload_size type="IntegerField">
|
||||
<default>512</default>
|
||||
<MinimumValue>0</MinimumValue>
|
||||
<MaximumValue>8192</MaximumValue>
|
||||
<ValidationMessage>Should be a number between 0 and 8192</ValidationMessage>
|
||||
<Required>N</Required>
|
||||
</accepted_payload_size>
|
||||
<hold_valid type="TextField">
|
||||
<default>10s</default>
|
||||
<mask>/^([0-9]{1,8}(?:us|ms|s|m|h|d)?)/u</mask>
|
||||
<ValidationMessage>Should be a number between 1 and 8 characters, optionally followed by either "d", "h", "m", "s", "ms" or "us".</ValidationMessage>
|
||||
<Required>N</Required>
|
||||
</hold_valid>
|
||||
<hold_obsolete type="TextField">
|
||||
<default>10s</default>
|
||||
<mask>/^([0-9]{1,8}(?:us|ms|s|m|h|d)?)/u</mask>
|
||||
<ValidationMessage>Should be a number between 1 and 8 characters, optionally followed by either "d", "h", "m", "s", "ms" or "us".</ValidationMessage>
|
||||
<Required>N</Required>
|
||||
</hold_obsolete>
|
||||
<hold_refused type="TextField">
|
||||
<default>10s</default>
|
||||
<mask>/^([0-9]{1,8}(?:us|ms|s|m|h|d)?)/u</mask>
|
||||
<ValidationMessage>Should be a number between 1 and 8 characters, optionally followed by either "d", "h", "m", "s", "ms" or "us".</ValidationMessage>
|
||||
<Required>N</Required>
|
||||
</hold_refused>
|
||||
<hold_nx type="TextField">
|
||||
<default>10s</default>
|
||||
<mask>/^([0-9]{1,8}(?:us|ms|s|m|h|d)?)/u</mask>
|
||||
<ValidationMessage>Should be a number between 1 and 8 characters, optionally followed by either "d", "h", "m", "s", "ms" or "us".</ValidationMessage>
|
||||
<Required>N</Required>
|
||||
</hold_nx>
|
||||
<hold_timeout type="TextField">
|
||||
<default>10s</default>
|
||||
<mask>/^([0-9]{1,8}(?:us|ms|s|m|h|d)?)/u</mask>
|
||||
<ValidationMessage>Should be a number between 1 and 8 characters, optionally followed by either "d", "h", "m", "s", "ms" or "us".</ValidationMessage>
|
||||
<Required>N</Required>
|
||||
</hold_timeout>
|
||||
<hold_other type="TextField">
|
||||
<default>10s</default>
|
||||
<mask>/^([0-9]{1,8}(?:us|ms|s|m|h|d)?)/u</mask>
|
||||
<ValidationMessage>Should be a number between 1 and 8 characters, optionally followed by either "d", "h", "m", "s", "ms" or "us".</ValidationMessage>
|
||||
<Required>N</Required>
|
||||
</hold_other>
|
||||
</resolver>
|
||||
</resolvers>
|
||||
<mailers>
|
||||
|
||||
@@ -1080,6 +1080,27 @@ resolvers {{resolver.id}}
|
||||
{% if resolver.timeout_retry|default("") != "" %}
|
||||
timeout retry {{resolver.timeout_retry}}
|
||||
{% endif %}
|
||||
{% if resolver.accepted_payload_size|default("") != "" %}
|
||||
accepted_payload_size {{resolver.accepted_payload_size}}
|
||||
{% endif %}
|
||||
{% if resolver.hold_valid|default("") != "" %}
|
||||
hold valid {{resolver.hold_valid}}
|
||||
{% endif %}
|
||||
{% if resolver.hold_obsolete|default("") != "" %}
|
||||
hold obsolete {{resolver.hold_obsolete}}
|
||||
{% endif %}
|
||||
{% if resolver.hold_refused|default("") != "" %}
|
||||
hold refused {{resolver.hold_refused}}
|
||||
{% endif %}
|
||||
{% if resolver.hold_nx|default("") != "" %}
|
||||
hold nx {{resolver.hold_nx}}
|
||||
{% endif %}
|
||||
{% if resolver.hold_timeout|default("") != "" %}
|
||||
hold timeout {{resolver.hold_timeout}}
|
||||
{% endif %}
|
||||
{% if resolver.hold_other|default("") != "" %}
|
||||
hold other {{resolver.hold_other}}
|
||||
{% endif %}
|
||||
|
||||
{% else %}
|
||||
# Resolver (DISABLED): {{resolver.name}}
|
||||
|
||||
Reference in New Issue
Block a user