Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix mirror config for v6-primary #1699

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion common.sh
Original file line number Diff line number Diff line change
Expand Up @@ -481,7 +481,7 @@ if [[ ! -z ${AGENT_E2E_TEST_BOOT_MODE} ]]; then
esac
fi

if [[ (-n "$MIRROR_IMAGES" && "${MIRROR_IMAGES,,}" != "false") || -z "${IP_STACK:-}" || "$IP_STACK" = "v6" ]]; then
if [[ (-n "$MIRROR_IMAGES" && "${MIRROR_IMAGES,,}" != "false") || -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
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
Copy link
Contributor

@hjensas hjensas Sep 12, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we use ${MIRROR_IMAGES:-true} here? like L142? So that we only set true if the user did not already set MIRROR_IMAGES=false in config.

fi
else
echo "Unexpected setting for IP_STACK: '${IP_STACK}'"
exit 1
Expand Down