Skip to content
Closed
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
Original file line number Diff line number Diff line change
Expand Up @@ -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}
Expand Down Expand Up @@ -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
Expand All @@ -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
Expand Down
Original file line number Diff line number Diff line change
@@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down Expand Up @@ -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
Original file line number Diff line number Diff line change
Expand Up @@ -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