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

network: fix generation of VIPs for single- and dual-stack setups #1628

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
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
12 changes: 9 additions & 3 deletions network.sh
Original file line number Diff line number Diff line change
Expand Up @@ -223,7 +223,7 @@ function concat_parameters_with_vipsseparator() {
#
# Returns:
# Print all given parameters with ${VIPS_SEPARATOR} in between.

ARG_NR=1
RESULT=""
for ARG in "$@"; do
Expand Down Expand Up @@ -258,10 +258,16 @@ function get_vips() {
INGRESS_VIPS_V6=$(nth_ip $EXTERNAL_SUBNET_V6 4)
fi

if [[ "$IP_STACK" == "v4" || "$IP_STACK" == "v4v6" ]]; then
if [[ "$IP_STACK" == "v4" ]]; then
API_VIPS=${API_VIPS_V4:-}
INGRESS_VIPS=${INGRESS_VIPS_V4:-}
elif [[ "$IP_STACK" == "v6" ]]; then
API_VIPS=${API_VIPS_V6:-}
INGRESS_VIPS=${INGRESS_VIPS_V6:-}
elif [[ "$IP_STACK" == "v4v6" ]]; then
API_VIPS=$(concat_parameters_with_vipsseparator ${API_VIPS_V4:-} ${API_VIPS_V6:-})
INGRESS_VIPS=$(concat_parameters_with_vipsseparator ${INGRESS_VIPS_V4:-} ${INGRESS_VIPS_V6:-})
else
else # The only remaining is "v6v4"
API_VIPS=$(concat_parameters_with_vipsseparator ${API_VIPS_V6:-} ${API_VIPS_V4:-})
INGRESS_VIPS=$(concat_parameters_with_vipsseparator ${INGRESS_VIPS_V6:-} ${INGRESS_VIPS_V4:-})
fi
Expand Down