haproxy: ocp cluster is only in iad2

If we push this to all proxies (as we have), they will fail to start
haproxy because they cannot resolve the internal ocp iad2 hosts. ;(

The ocp clusters should only apply on the iad2 haproxy nodes, not all
proxies. Also fix logic on the staging one to apply in staging instead
of just production.

Signed-off-by: Kevin Fenzi <kevin@scrye.com>
This commit is contained in:
Kevin Fenzi 2021-09-04 10:51:00 -07:00
parent 5a8f655671
commit 6ce2275510

View file

@ -37,7 +37,7 @@ backend stats-backend
stats enable
stats uri /
{% if env == "production" %}
{% if env == "production" and 'iad2' in inventory_hostname %}
frontend ocp-masters-kapi
mode tcp
bind 0.0.0.0:6443
@ -65,7 +65,7 @@ backend ocp-masters-backend-machineconfig
server bootstrap.ocp.iad2.fedoraproject.org bootstrap.ocp.iad2.fedoraproject.org:22623 weight 1 maxconn 16384 check
{% endif %}
{% if env != "production" %}
{% if env != "production" and 'iad2' in inventory_hostname %}
frontend ocp-masters-kapi
mode tcp
bind 0.0.0.0:6443