Allow disable option *-check for mysql/pgsql type
diff --git a/haproxy/files/haproxy.cfg b/haproxy/files/haproxy.cfg
index 7aae743..e3f515f 100644
--- a/haproxy/files/haproxy.cfg
+++ b/haproxy/files/haproxy.cfg
@@ -84,7 +84,10 @@
option srvtcpka
timeout client 300s
timeout server 300s
+ {%- if listen.get('health-check').get('mysql', {}).get('enabled', True) %}
+ # option conflict's wiht port check of clustercheck script, if enabled haproxy reports invalid reponse
option mysql-check user haproxy
+ {%- endif %}
{%- elif listen.get('type', None) == 'pgsql' %}
balance leastconn
mode tcp
@@ -94,7 +97,9 @@
option srvtcpka
timeout client 28801s
timeout server 28801s
+ {%- if listen.get('health-check').get('pgsql', {}).get('enabled', True) %}
option pgsql-check user postgres
+ {%- endif %}
{%- elif listen.get('type', None) == 'horizon' %}
balance source
capture cookie vgnvisitor= len 32