From a4ef172fdcf348fb810e5d4b687b74a5614bdf0a Mon Sep 17 00:00:00 2001 From: Xav Paice Date: Wed, 21 Oct 2020 10:32:20 +1300 Subject: [PATCH] Update haproxy.cfg template for tls backends Adds a switch so that if the context for haproxy config includes backend_options['check_ssl'] then haproxy will run http checks via https. --- charmhelpers/contrib/openstack/templates/haproxy.cfg | 3 +++ 1 file changed, 3 insertions(+) diff --git a/charmhelpers/contrib/openstack/templates/haproxy.cfg b/charmhelpers/contrib/openstack/templates/haproxy.cfg index d36af2aa8..11db399af 100644 --- a/charmhelpers/contrib/openstack/templates/haproxy.cfg +++ b/charmhelpers/contrib/openstack/templates/haproxy.cfg @@ -71,6 +71,9 @@ backend {{ service }}_{{ frontend }} {% endif -%} {% for unit, address in frontends[frontend]['backends'].items() -%} server {{ unit }} {{ address }}:{{ ports[1] }} check + {%- if backend_options -%} + {%- if backend_options['check_ssl'] %} check-ssl verify none{% endif -%} + {%- endif %} {% endfor %} {% endfor -%} {% endfor -%}