Add support for HAProxy L7 checks
This change add several configuration options from charm-layer-openstack-api to enable HTTP checks to the HAProxy configuration, instead of the default TCP connection checks (which continue to be the default) In case apache2 is enabled, the template adds a tls check Closes-Bug: #1880610 Change-Id: Ie091fdfe560b6a060f0c29c6b92a99f5e564eddf
This commit is contained in:
parent
8b31ef19e4
commit
dbbde3ae08
|
@ -72,8 +72,16 @@ frontend tcp-in_{{ service }}
|
|||
{% for frontend in cluster.cluster_hosts -%}
|
||||
backend {{ service }}_{{ frontend }}
|
||||
balance leastconn
|
||||
{%- if options.haproxy_check_http %}
|
||||
{{ options.haproxy_check_request }}
|
||||
{{ options.haproxy_check_expected }}
|
||||
{%- endif %}
|
||||
{% for unit, address in cluster.cluster_hosts[frontend]['backends'].items() -%}
|
||||
{% if cluster.api_config_adapter.apache_enabled -%}
|
||||
server {{ unit }} {{ address }}:{{ ports[1] }} check check-ssl verify none
|
||||
{% else -%}
|
||||
server {{ unit }} {{ address }}:{{ ports[1] }} check
|
||||
{% endif -%}
|
||||
{% endfor %}
|
||||
{% endfor -%}
|
||||
{% endfor -%}
|
||||
|
|
Loading…
Reference in New Issue