Skip to content

Commit 19f63d2

Browse files
committed
Fix mirror config for v6-primary
It turns out we do need to mirror images for v6-primary clusters because during provisioning they only get an IP from the primary family, which means they can't pull images from the public ipv4 image registries. This fixes the logic so it is all consistent where it needs to be so v6-primary deployments will work as intended by default.
1 parent 4155b90 commit 19f63d2

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

common.sh

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -503,8 +503,7 @@ if [[ ! -z ${AGENT_E2E_TEST_BOOT_MODE} ]]; then
503503
esac
504504
fi
505505

506-
if [[ "${MIRROR_IMAGES,,}" != "false" ]] && [[ "${MIRROR_IMAGES,,}" == "true" || -z "${IP_STACK:-}" || "$IP_STACK" = "v6" ]]; then
507-
506+
if [[ "${MIRROR_IMAGES,,}" != "false" ]] && [[ "${MIRROR_IMAGES,,}" == "true" || -z "${IP_STACK:-}" || "$IP_STACK" = "v6" || "$IP_STACK" = "v6v4" ]]; then
508507
if [[ "${MIRROR_COMMAND}" == "oc-mirror" ]]; then
509508
# Use the string that is generated by the output of oc-mirror
510509
export LOCAL_IMAGE_URL_SUFFIX="openshift/release-images"

network.sh

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -148,6 +148,11 @@ elif [[ "$IP_STACK" = "v4v6" || "$IP_STACK" = "v6v4" ]]; then
148148
export SERVICE_SUBNET_V4=${SERVICE_SUBNET_V4:-"172.30.0.0/16"}
149149
export SERVICE_SUBNET_V6=${SERVICE_SUBNET_V6:-"fd02::/112"}
150150
export NETWORK_TYPE=${NETWORK_TYPE:-"OVNKubernetes"}
151+
# Although v6-primary clusters have access to both v4 and v6, during provisioning
152+
# the nodes only get v6 addresses so we need to mirror images or they can't pull.
153+
if [[ "$IP_STACK" = "v6v4" ]]; then
154+
export MIRROR_IMAGES=true
155+
fi
151156
else
152157
echo "Unexpected setting for IP_STACK: '${IP_STACK}'"
153158
exit 1

0 commit comments

Comments
 (0)