aboutsummaryrefslogtreecommitdiff
path: root/ansible
diff options
context:
space:
mode:
authorzhubingbing <1392607554@qq.com>2016-09-28 02:31:04 +0000
committerzhubingbing <1392607554@qq.com>2016-09-28 04:03:43 +0000
commitbcf7afb801bd34369a67f361dd1148692d6da440 (patch)
tree06b0a98bc6b5909a99eda8c22704fb0d36e13c86 /ansible
parent622c88ec99c537fec3bd66d913b82ce3462e8a3a (diff)
downloadkolla-bcf7afb801bd34369a67f361dd1148692d6da440.tar.gz
kolla-bcf7afb801bd34369a67f361dd1148692d6da440.zip
add congress api to haproxy
TrivialFix Change-Id: Ie836e1e12a40692b7da3cdd24b0a980ee6081b16
Diffstat (limited to 'ansible')
-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 a0594e11e..959e0da35 100644
--- a/ansible/roles/haproxy/templates/haproxy.cfg.j2
+++ b/ansible/roles/haproxy/templates/haproxy.cfg.j2
@@ -533,6 +533,25 @@ listen aodh_api_external
{% endif %}
{% endif %}
+{% if enable_congress | bool %}
+listen congress_api
+ bind {{ kolla_internal_vip_address }}:{{ congress_api_port }}
+ http-request del-header X-Forwarded-Proto
+{% for host in groups['congress-api'] %}
+ server {{ hostvars[host]['ansible_hostname'] }} {{ hostvars[host]['ansible_' + hostvars[host]['api_interface']]['ipv4']['address'] }}:{{ congress_api_port }} check inter 2000 rise 2 fall 5
+{% endfor %}
+{% if haproxy_enable_external_vip | bool %}
+
+listen congress_api_external
+ bind {{ kolla_external_vip_address }}:{{ congress_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['congress-api'] %}
+ server {{ hostvars[host]['ansible_hostname'] }} {{ hostvars[host]['ansible_' + hostvars[host]['api_interface']]['ipv4']['address'] }}:{{ congress_api_port }} check inter 2000 rise 2 fall 5
+{% endfor %}
+{% endif %}
+{% endif %}
+
# (NOTE): This defaults section deletes forwardfor as recomended by:
# https://marc.info/?l=haproxy&m=141684110710132&w=1