Skip to content

Commit

Permalink
Fix mirror config for v6-primary
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
cybertron committed Feb 7, 2025
1 parent 4155b90 commit 19f63d2
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
3 changes: 1 addition & 2 deletions common.sh
Original file line number Diff line number Diff line change
Expand Up @@ -503,8 +503,7 @@ if [[ ! -z ${AGENT_E2E_TEST_BOOT_MODE} ]]; then
esac
fi

if [[ "${MIRROR_IMAGES,,}" != "false" ]] && [[ "${MIRROR_IMAGES,,}" == "true" || -z "${IP_STACK:-}" || "$IP_STACK" = "v6" ]]; then

if [[ "${MIRROR_IMAGES,,}" != "false" ]] && [[ "${MIRROR_IMAGES,,}" == "true" || -z "${IP_STACK:-}" || "$IP_STACK" = "v6" || "$IP_STACK" = "v6v4" ]]; then
if [[ "${MIRROR_COMMAND}" == "oc-mirror" ]]; then
# Use the string that is generated by the output of oc-mirror
export LOCAL_IMAGE_URL_SUFFIX="openshift/release-images"
Expand Down
5 changes: 5 additions & 0 deletions network.sh
Original file line number Diff line number Diff line change
Expand Up @@ -148,6 +148,11 @@ elif [[ "$IP_STACK" = "v4v6" || "$IP_STACK" = "v6v4" ]]; then
export SERVICE_SUBNET_V4=${SERVICE_SUBNET_V4:-"172.30.0.0/16"}
export SERVICE_SUBNET_V6=${SERVICE_SUBNET_V6:-"fd02::/112"}
export NETWORK_TYPE=${NETWORK_TYPE:-"OVNKubernetes"}
# Although v6-primary clusters have access to both v4 and v6, during provisioning
# the nodes only get v6 addresses so we need to mirror images or they can't pull.
if [[ "$IP_STACK" = "v6v4" ]]; then
export MIRROR_IMAGES=true
fi
else
echo "Unexpected setting for IP_STACK: '${IP_STACK}'"
exit 1
Expand Down

0 comments on commit 19f63d2

Please sign in to comment.