haproxy: use datacenter name instead of hostname

The proxies in the new fedora-isolated vlan are in rdu3 and have rdu3
domain in their hostname, but they aren't strictly in the rdu3
datacenter for purposes of access. They do not have acls to directly
talk to backend applications from that vlan.

Signed-off-by: Kevin Fenzi <kevin@scrye.com>
This commit is contained in:
Kevin Fenzi
2025-12-12 10:51:40 -08:00
parent 73c0c6214f
commit 4d82d65a9b

View File

@@ -32,7 +32,7 @@ backend stats-backend
stats enable
stats uri /
{% if env == "production" and 'rdu3' in inventory_hostname %}
{% if env == "production" and datacenter == 'rdu3' %}
frontend ocp-masters-kapi
mode tcp
option tcplog
@@ -62,7 +62,7 @@ backend ocp-masters-backend-machineconfig
# server bootstrap.ocp.rdu3.fedoraproject.org bootstrap.ocp.rdu3.fedoraproject.org:22623 weight 1 maxconn 16384 check
{% endif %}
{% if env != "production" and 'rdu3' in inventory_hostname %}
{% if env != "production" and datacenter == 'rdu3' %}
frontend ocp-masters-kapi
mode tcp
option tcplog
@@ -237,7 +237,7 @@ backend oci-candidate-registry-backend
balance hdr(appserver)
server oci-candidate-registry01 oci-candidate-registry01:5000 check inter 10s rise 1 fall 2
{% if 'rdu3' in inventory_hostname %}
{% if datacenter == 'rdu3' %}
# Only enable this on rdu3 proxies
frontend src-frontend
@@ -265,7 +265,7 @@ backend ipa01-backend
server ipa01 ipa01:443 check inter 10s rise 1 fall 2 ssl verify required ca-file /etc/haproxy/ipa.pem
option httpchk GET /ipa/ui/
{% if env == "production" and 'rdu3' in inventory_hostname %}
{% if env == "production" and datacenter == 'rdu3' %}
frontend kojipkgs-frontend
bind 0.0.0.0:10062
default_backend kojipkgs-backend
@@ -307,7 +307,7 @@ backend rabbitmq
server rabbitmq03 rabbitmq03:5671 weight 1 maxconn 16384
{% endif %}
{% if 'rdu3' in inventory_hostname %}
{% if datacenter == "rdu3" %}
frontend zabbix-frontend
bind 0.0.0.0:10068
default_backend zabbix-backend