diff --git a/states/haproxy/templates/haproxy.cfg.j2 b/states/haproxy/templates/haproxy.cfg.j2 index 13e588d..b4696b4 100644 --- a/states/haproxy/templates/haproxy.cfg.j2 +++ b/states/haproxy/templates/haproxy.cfg.j2 @@ -326,8 +326,7 @@ backend {{ name }} from {{ haproxy.config.namespace }} {%- if values.compression|default(True) %} {{ compression() }} {%- endif %} - - default-server maxconn 100 weight 100 inter 1s fall 5 + default-server maxconn 100 weight 100 inter 1s fall 5 agent-check agent-port 7265 agent-send "{{ name }}\n" {%- if values.internal|default(False) %} {{ internal() }} @@ -355,7 +354,7 @@ listen {{ name }} from {{ haproxy.config.namespace }} timeout server 1s option spop-check {%- endif %} - default-server maxconn 100 weight 100 inter 1s fall 5 + default-server maxconn 100 weight 100 inter 1s fall 5 agent-check agent-port 7265 agent-send "{{ name }}\n" {{- tcpendpoints(servers=values.servers|default([]), check=values.check|default(haproxy.config.check)) }} {% endfor %} {%- endif %} @@ -367,6 +366,7 @@ backend {{ name }} from {{ haproxy.config.namespace }} timeout connect 5s timeout server 3m option spop-check + default-server maxconn 100 weight 100 inter 1s fall 5 agent-check agent-port 7265 agent-send "{{ name }}\n" {{- tcpendpoints(servers=values.servers, check=values.check|default(haproxy.config.check)) }} {% endfor %}