aboutsummaryrefslogtreecommitdiff
path: root/docker/hautoproxy/haproxy.cfg.tmpl
diff options
context:
space:
mode:
authorLars Kellogg-Stedman <lars@redhat.com>2014-10-04 17:54:03 -0400
committerLars Kellogg-Stedman <lars@redhat.com>2014-10-06 13:58:20 -0400
commit154e2781d9debe5417bdec14689ace88eb4ea3e3 (patch)
tree1f2d5bc80d31f0de0f373788228bb2ad51e029af /docker/hautoproxy/haproxy.cfg.tmpl
parent9414ab5cadea0cfd958cc7dfc0041eb758f452e6 (diff)
downloadkolla-154e2781d9debe5417bdec14689ace88eb4ea3e3.tar.gz
kolla-154e2781d9debe5417bdec14689ace88eb4ea3e3.zip
added hautoproxy auto-configuring haproxy
This image configures haproxy to forward connections for all available kubernetes services. It is meant to be run alongside other contains in a kubernetes pod to provide access to "remote" services at a consistent address so that keystone api endpoints can be configured in a sane fashion. Change-Id: Ic923c6a772f1bdf36b97b05a1d04de9e5b841ddd
Diffstat (limited to 'docker/hautoproxy/haproxy.cfg.tmpl')
-rw-r--r--docker/hautoproxy/haproxy.cfg.tmpl26
1 files changed, 26 insertions, 0 deletions
diff --git a/docker/hautoproxy/haproxy.cfg.tmpl b/docker/hautoproxy/haproxy.cfg.tmpl
new file mode 100644
index 000000000..cd1174b21
--- /dev/null
+++ b/docker/hautoproxy/haproxy.cfg.tmpl
@@ -0,0 +1,26 @@
+global
+ daemon
+ maxconn 4096
+ pidfile /var/run/haproxy.pid
+
+defaults
+ mode tcp
+ timeout connect 5s
+ timeout client 1m
+ timeout server 1m
+ option redispatch
+ balance roundrobin
+
+listen stats :1936
+ mode http
+ stats enable
+ stats hide-version
+ #stats realm Haproxy\ Statistics
+ stats uri /
+ #stats auth Username:Password
+
+{% for service in services %}
+listen {{ service.service_name }}
+ bind 127.0.0.1:{{service.local_port}}
+ server {{ service.remote_name }} {{ service.remote_addr }}:{{ service.remote_port}} check inter 2s rise 3 fall 2
+{% endfor %}