Skip to content

Commit a88205d

Browse files
committed
Fix IPv6 VIPs DNS lookup for baremetal deployments
Issue when using Dual stack networking as EXTERNAL_SUBNET_V4 is defined. Instead, use IP_STACK for setting API_VIPS and INGRESS_VIPS for either IPV4, IPV6 or Dual stack
1 parent b2550ae commit a88205d

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

network.sh

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -319,11 +319,13 @@ function set_api_and_ingress_vip() {
319319
configure_dnsmasq ${API_VIPS} ${INGRESS_VIPS}
320320
else
321321
# Specific for users *NOT* using devscript with KVM (virsh) for deploy. (Reads: baremetal)
322-
if [[ -z "${EXTERNAL_SUBNET_V4}" ]]; then
322+
# Use IPv6 AAAA records for IPv6-only (v6) or IPv6-primary dual-stack (v6v4) deployments
323+
if [[ "${IP_STACK}" == "v6" || "${IP_STACK}" == "v6v4" ]]; then
323324
API_VIPS=$(dig -t AAAA +noall +answer "api.${CLUSTER_DOMAIN}" | awk '{print $NF}')
325+
INGRESS_VIPS=$(dig -t AAAA +noall +answer "test.apps.${CLUSTER_DOMAIN}" | awk '{print $NF}')
324326
else
325327
API_VIPS=$(dig +noall +answer "api.${CLUSTER_DOMAIN}" | awk '{print $NF}')
328+
INGRESS_VIPS=$(dig +noall +answer "test.apps.${CLUSTER_DOMAIN}" | awk '{print $NF}')
326329
fi
327-
INGRESS_VIPS=$(dig +noall +answer "test.apps.${CLUSTER_DOMAIN}" | awk '{print $NF}')
328330
fi
329331
}

0 commit comments

Comments
 (0)