r/haproxy: Support configuring resolvers
HAProxy uses a special configuration block, `resolvers`, to specify how it should look up names in DNS. This configuration is used for e.g. dynamically discovering backend servers via DNS A or SRV records. Since resolvers are global, they need to be specified in the global configuration file, rather than a per-application drop-in. We will use this functionality for the ACME HTTP-01 challenge solver for Samba AD domain controllers.
This commit is contained in:
@@ -21,3 +21,15 @@ global
|
|||||||
{% if haproxy_ssl_default_bind_options|d %}
|
{% if haproxy_ssl_default_bind_options|d %}
|
||||||
ssl-default-bind-options {{ haproxy_ssl_default_bind_options }}
|
ssl-default-bind-options {{ haproxy_ssl_default_bind_options }}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
{% if haproxy_resolvers|d %}
|
||||||
|
{% for resolver in haproxy_resolvers %}
|
||||||
|
|
||||||
|
resolvers {{ resolver.name }}
|
||||||
|
{% for nameserver in resolver.nameservers %}
|
||||||
|
nameserver {{ nameserver.name }} {{ nameserver.address }}
|
||||||
|
{% endfor %}
|
||||||
|
{% for key, value in resolver.options|dictsort %}
|
||||||
|
{{ key }} {{ value }}
|
||||||
|
{% endfor %}
|
||||||
|
{% endfor %}
|
||||||
|
{% endif %}
|
||||||
|
|||||||
Reference in New Issue
Block a user