aboutsummaryrefslogtreecommitdiff
path: root/ansible/roles/haproxy/templates/haproxy.cfg.j2
diff options
context:
space:
mode:
Diffstat (limited to 'ansible/roles/haproxy/templates/haproxy.cfg.j2')
-rw-r--r--ansible/roles/haproxy/templates/haproxy.cfg.j219
1 files changed, 19 insertions, 0 deletions
diff --git a/ansible/roles/haproxy/templates/haproxy.cfg.j2 b/ansible/roles/haproxy/templates/haproxy.cfg.j2
index a0bb55f10..783f9c2b7 100644
--- a/ansible/roles/haproxy/templates/haproxy.cfg.j2
+++ b/ansible/roles/haproxy/templates/haproxy.cfg.j2
@@ -236,6 +236,25 @@ listen cinder_api_external
{% endif %}
{% endif %}
+{% if enable_cloudkitty | bool %}
+listen cloudkitty_api
+ bind {{ kolla_internal_vip_address }}:{{ cloudkitty_api_port }}
+ http-request del-header X-Forwarded-Proto
+{% for host in groups['cloudkitty-api'] %}
+ server {{ hostvars[host]['ansible_hostname'] }} {{ hostvars[host]['ansible_' + hostvars[host]['api_interface']]['ipv4']['address'] }}:{{ cloudkitty_api_port }} check inter 2000 rise 2 fall 5
+{% endfor %}
+{% if haproxy_enable_external_vip | bool %}
+
+listen cloudkitty_api_external
+ bind {{ kolla_external_vip_address }}:{{ cloudkitty_api_port }} {{ tls_bind_info }}
+ http-request del-header X-Forwarded-Proto
+ http-request set-header X-Forwarded-Proto https if { ssl_fc }
+{% for host in groups['cloudkitty-api'] %}
+ server {{ hostvars[host]['ansible_hostname'] }} {{ hostvars[host]['ansible_' + hostvars[host]['api_interface']]['ipv4']['address'] }}:{{ cloudkitty_api_port }} check inter 2000 rise 2 fall 5
+{% endfor %}
+{% endif %}
+{% endif %}
+
{% if enable_heat | bool %}
listen heat_api
bind {{ kolla_internal_vip_address }}:{{ heat_api_port }}