diff --git a/ci-operator/step-registry/ipi/install/install/ipi-install-install-commands.sh b/ci-operator/step-registry/ipi/install/install/ipi-install-install-commands.sh index 5e6fede17b8b8..21be2bf0c319c 100755 --- a/ci-operator/step-registry/ipi/install/install/ipi-install-install-commands.sh +++ b/ci-operator/step-registry/ipi/install/install/ipi-install-install-commands.sh @@ -395,6 +395,34 @@ EOF done } +function vsphere_internal_network() { + local dir=${1} + + + PATCH="${SHARED_DIR}/nodeNetworking-internal.yaml.patch" + cat > "${PATCH}" << EOF +spec: + platformSpec: + vsphere: + nodeNetworking: + internal: + networkSubnetCidr: + - "$MACHINE_NETWORK_0" + - "$MACHINE_NETWORK_1" + external: + networkSubnetCidr: + - "$MACHINE_NETWORK_0" + - "$MACHINE_NETWORK_1" +EOF + + + yq-go m -x -i $dir/manifests/cluster-infrastructure-02-config.yml "${PATCH}" + + cat $dir/manifests/cluster-infrastructure-02-config.yml +} + + + # inject_spot_instance_config is an AWS specific option that enables the use of AWS spot instances for worker nodes function inject_spot_instance_config() { local dir=${1} @@ -528,6 +556,9 @@ dir=/tmp/installer mkdir "${dir}/" cp "${SHARED_DIR}/install-config.yaml" "${dir}/" +MACHINE_NETWORK_0=$(yq-go r "${SHARED_DIR}/install-config.yaml" 'networking.machineNetwork[0].cidr') +MACHINE_NETWORK_1=$(yq-go r "${SHARED_DIR}/install-config.yaml" 'networking.machineNetwork[1].cidr') + echo "install-config.yaml" echo "-------------------" cat ${SHARED_DIR}/install-config.yaml | grep -v "password\|username\|pullSecret" | tee ${ARTIFACT_DIR}/install-config.yaml @@ -544,6 +575,7 @@ wait "$!" # Platform specific manifests adjustments case "${CLUSTER_TYPE}" in +vsphere) vsphere_internal_network ${dir} ;; azure4|azure-arm64) inject_boot_diagnostics ${dir} ;; aws|aws-arm64|aws-usgov) if [[ "${SPOT_INSTANCES:-}" == 'true' ]]; then diff --git a/ci-operator/step-registry/ipi/install/install/ipi-install-install-ref.yaml b/ci-operator/step-registry/ipi/install/install/ipi-install-install-ref.yaml index bf20554c9ade3..5e2fdfa30ea60 100644 --- a/ci-operator/step-registry/ipi/install/install/ipi-install-install-ref.yaml +++ b/ci-operator/step-registry/ipi/install/install/ipi-install-install-ref.yaml @@ -1,6 +1,6 @@ ref: as: ipi-install-install - from: installer + from: upi-installer grace_period: 10m commands: ipi-install-install-commands.sh cli: latest diff --git a/ci-operator/step-registry/ovn/conf/vsphere-dualstack/ovn-conf-vsphere-dualstack-commands.sh b/ci-operator/step-registry/ovn/conf/vsphere-dualstack/ovn-conf-vsphere-dualstack-commands.sh index 689bb1943c4c2..83d3c7472030f 100644 --- a/ci-operator/step-registry/ovn/conf/vsphere-dualstack/ovn-conf-vsphere-dualstack-commands.sh +++ b/ci-operator/step-registry/ovn/conf/vsphere-dualstack/ovn-conf-vsphere-dualstack-commands.sh @@ -5,8 +5,8 @@ set -o pipefail echo "saving ipv4 vip configuration" -API_VIP=$(/tmp/yq e '.platform.vsphere.apiVIP' ${SHARED_DIR}/install-config.yaml) -INGRESS_VIP=$(/tmp/yq e '.platform.vsphere.ingressVIP' ${SHARED_DIR}/install-config.yaml) +API_VIP=$(/tmp/yq e '.platform.vsphere.apiVIP' "${SHARED_DIR}/install-config.yaml") +INGRESS_VIP=$(/tmp/yq e '.platform.vsphere.ingressVIP' "${SHARED_DIR}/install-config.yaml") export API_VIP export INGRESS_VIP @@ -35,3 +35,12 @@ networking: - 172.30.0.0/16 - fd65:172:16::/112 EOF + +if [[ "${IP_FAMILIES}" == "DualStackIPv6Primary" ]]; then + echo Swapping IP addresses + /tmp/yq e --inplace '.platform.vsphere.apiVIPs = (.platform.vsphere.apiVIPs | reverse)' ${SHARED_DIR}/install-config.yaml + /tmp/yq e --inplace '.platform.vsphere.ingressVIPs = (.platform.vsphere.ingressVIPs | reverse)' ${SHARED_DIR}/install-config.yaml + /tmp/yq e --inplace '.networking.machineNetwork = (.networking.machineNetwork | reverse)' "${SHARED_DIR}/install-config.yaml" + /tmp/yq e --inplace '.networking.clusterNetwork = (.networking.clusterNetwork | reverse)' "${SHARED_DIR}/install-config.yaml" + /tmp/yq e --inplace '.networking.serviceNetwork = (.networking.serviceNetwork | reverse)' "${SHARED_DIR}/install-config.yaml" +fi diff --git a/ci-operator/step-registry/ovn/conf/vsphere-dualstack/ovn-conf-vsphere-dualstack-ref.yaml b/ci-operator/step-registry/ovn/conf/vsphere-dualstack/ovn-conf-vsphere-dualstack-ref.yaml index 86e96ee72919c..0347cdc2d0673 100644 --- a/ci-operator/step-registry/ovn/conf/vsphere-dualstack/ovn-conf-vsphere-dualstack-ref.yaml +++ b/ci-operator/step-registry/ovn/conf/vsphere-dualstack/ovn-conf-vsphere-dualstack-ref.yaml @@ -9,5 +9,8 @@ ref: requests: cpu: 10m memory: 100Mi + env: + - name: IP_FAMILIES + default: "DualStack" documentation: |- The ovn dualstack conf step adds the configuration for dualstack to set of manifests for installation