From f9b52f076a750620a0fb71134d9df793b0cb02ab Mon Sep 17 00:00:00 2001 From: Jacob Cody Wimer Date: Tue, 16 Apr 2019 07:45:19 -0400 Subject: [PATCH] Expose gitea with haproxy --- roles/haproxy/templates/haproxy.cfg.j2 | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/roles/haproxy/templates/haproxy.cfg.j2 b/roles/haproxy/templates/haproxy.cfg.j2 index c2f8f78..21a8c8c 100644 --- a/roles/haproxy/templates/haproxy.cfg.j2 +++ b/roles/haproxy/templates/haproxy.cfg.j2 @@ -47,3 +47,11 @@ listen kubernetes {% for node in groups['kube-masters'] %} server {{node}} {{ hostvars[node]['ansible_host'] }}:6443 check fall 3 inter 3s rise 2 {% endfor %} + +listen gitea + bind *:2222 + mode tcp + balance roundrobin +{% for node in groups['kube-workers'] %} + server {{node}} {{ hostvars[node]['ansible_host'] }}:2222 check fall 3 inter 3s rise 2 +{% endfor %}