@@ -393,10 +393,18 @@ objects:
393
393
cp "$(command -v openshift-install)" /tmp
394
394
mkdir /tmp/artifacts/installer
395
395
396
+ function has_variant() {
397
+ regex="(^|,)$1($|,)"
398
+ if [[ $CLUSTER_VARIANT =~ $regex ]]; then
399
+ return 0
400
+ fi
401
+ return 1
402
+ }
403
+
396
404
if [[ -n "${INSTALL_INITIAL_RELEASE}" && -n "${RELEASE_IMAGE_INITIAL}" ]]; then
397
405
echo "Installing from initial release ${RELEASE_IMAGE_INITIAL}"
398
406
OPENSHIFT_INSTALL_RELEASE_IMAGE_OVERRIDE="${RELEASE_IMAGE_INITIAL}"
399
- elif [[ "${CLUSTER_VARIANT}" =~ " mirror" ]] ; then
407
+ elif has_variant " mirror"; then
400
408
export PATH=$PATH:/tmp # gain access to oc
401
409
while [ ! command -V oc ]; do sleep 1; done # poll to make sure that the test container has dropped oc into the shared volume
402
410
@@ -424,18 +432,18 @@ objects:
424
432
cp "${SSH_PRIV_KEY_PATH}" ~/.ssh/
425
433
426
434
workers=3
427
- if [[ "${CLUSTER_VARIANT}" =~ " compact" ]] ; then
435
+ if has_variant " compact"; then
428
436
workers=0
429
437
fi
430
438
if [[ "${CLUSTER_TYPE}" = "aws" ]]; then
431
439
master_type=null
432
- if [[ "${CLUSTER_VARIANT}" =~ " xlarge" ]] ; then
440
+ if has_variant " xlarge"; then
433
441
master_type=m5.8xlarge
434
- elif [[ "${CLUSTER_VARIANT}" =~ " large" ]] ; then
442
+ elif has_variant " large"; then
435
443
master_type=m5.4xlarge
436
444
fi
437
445
subnets="[]"
438
- if [[ "${CLUSTER_VARIANT}" =~ " shared-vpc" ]] ; then
446
+ if has_variant " shared-vpc"; then
439
447
case $((RANDOM % 4)) in
440
448
0) subnets="['subnet-030a88e6e97101ab2','subnet-0e07763243186cac5','subnet-02c5fea7482f804fb','subnet-0291499fd1718ee01','subnet-01c4667ad446c8337','subnet-025e9043c44114baa']";;
441
449
1) subnets="['subnet-0170ee5ccdd7e7823','subnet-0d50cac95bebb5a6e','subnet-0094864467fc2e737','subnet-0daa3919d85296eb6','subnet-0ab1e11d3ed63cc97','subnet-07681ad7ce2b6c281']";;
@@ -498,7 +506,7 @@ objects:
498
506
vnetname=""
499
507
ctrlsubnet=""
500
508
computesubnet=""
501
- if [[ "${CLUSTER_VARIANT}" =~ " shared-vpc" ]] ; then
509
+ if has_variant " shared-vpc"; then
502
510
vnetrg="os4-common"
503
511
vnetname="do-not-delete-shared-vnet-${AZURE_REGION}"
504
512
ctrlsubnet="subnet-1"
@@ -545,7 +553,7 @@ objects:
545
553
network=""
546
554
ctrlsubnet=""
547
555
computesubnet=""
548
- if [[ "${CLUSTER_VARIANT}" =~ " shared-vpc" ]] ; then
556
+ if has_variant " shared-vpc"; then
549
557
network="do-not-delete-shared-network"
550
558
ctrlsubnet="do-not-delete-shared-master-subnet"
551
559
computesubnet="do-not-delete-shared-worker-subnet"
@@ -580,7 +588,7 @@ objects:
580
588
581
589
# as a current stop gap -- this is pointing to a proxy hosted in
582
590
# the namespace "ci-test-ewolinet" on the ci cluster
583
- if [[ "${CLUSTER_VARIANT}" =~ " proxy" ]] ; then
591
+ if has_variant " proxy"; then
584
592
585
593
# FIXME: due to https://bugzilla.redhat.com/show_bug.cgi?id=1750650 we need to
586
594
# use a http endpoint for the httpsProxy value
@@ -664,17 +672,31 @@ objects:
664
672
fi
665
673
666
674
network_type="${CLUSTER_NETWORK_TYPE-}"
667
- if [[ "${CLUSTER_VARIANT}" =~ " ovn" ]] ; then
675
+ if has_variant " ovn"; then
668
676
network_type=OVNKubernetes
669
677
fi
670
- if [[ -n "${network_type}" ]]; then
678
+ if has_variant "ipv6"; then
679
+ export OPENSHIFT_INSTALL_AZURE_EMULATE_SINGLESTACK_IPV6=true
680
+ cat >> /tmp/artifacts/installer/install-config.yaml << EOF
681
+ networking:
682
+ networkType: OVNKubernetes
683
+ machineNetwork:
684
+ - cidr: 10.0.0.0/16
685
+ - cidr: fd00::/48
686
+ clusterNetwork:
687
+ - cidr: fd01::/48
688
+ hostPrefix: 64
689
+ serviceNetwork:
690
+ - fd02::/112
691
+ EOF
692
+ elif [[ -n "${network_type}" ]]; then
671
693
cat >> /tmp/artifacts/installer/install-config.yaml << EOF
672
694
networking:
673
695
networkType: ${network_type}
674
696
EOF
675
697
fi
676
698
677
- if [[ "${CLUSTER_VARIANT}" =~ " mirror" ]] ; then
699
+ if has_variant " mirror"; then
678
700
cat >> /tmp/artifacts/installer/install-config.yaml << EOF
679
701
imageContentSources:
680
702
- source: "${MIRROR_BASE}-scratch"
@@ -683,7 +705,7 @@ objects:
683
705
EOF
684
706
fi
685
707
686
- if [[ "${CLUSTER_VARIANT}" =~ " fips" ]] ; then
708
+ if has_variant " fips"; then
687
709
cat >> /tmp/artifacts/installer/install-config.yaml << EOF
688
710
fips: true
689
711
EOF
0 commit comments