From 4d82d65a9bb98a00c99e50e7ea71defac36c50e2 Mon Sep 17 00:00:00 2001 From: Kevin Fenzi Date: Fri, 12 Dec 2025 10:51:40 -0800 Subject: [PATCH] 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 --- roles/haproxy/templates/haproxy.cfg | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/roles/haproxy/templates/haproxy.cfg b/roles/haproxy/templates/haproxy.cfg index 3a8cf5ec09..9befc67a8c 100644 --- a/roles/haproxy/templates/haproxy.cfg +++ b/roles/haproxy/templates/haproxy.cfg @@ -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