Skip to content

Commit

Permalink
OPENSHIFTP-134: remove OpenShiftSDN from automation
Browse files Browse the repository at this point in the history
Signed-off-by: Paul Bastide <[email protected]>
  • Loading branch information
prb112 committed Jun 13, 2024
1 parent 5b09c9f commit a74e493
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 10 deletions.
4 changes: 3 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,9 @@ The [`ocp4-upi-compute-powervs` project](https://github.com/ibm/ocp4-upi-compute
5. Optional: An CentOS Stream 9 Image loaded to the PowerVS Service
6. An Existing OpenShift Container Platform Cluster installed on IBMCloud VPC with Intel architecture.

The DHCP network that the automation creates is going to have the Gateway on the first IP and use the 5th IP for the bastion's Internal IP.
## Important Notes
1. The DHCP network that the automation creates is going to have the Gateway on the first IP and use the 5th IP for the bastion's Internal IP.
2. The Automation Supports OVN-Kube networks only.

## Commands

Expand Down
11 changes: 2 additions & 9 deletions modules/4_pvs_support/pvs_support.tf
Original file line number Diff line number Diff line change
Expand Up @@ -197,19 +197,12 @@ resource "null_resource" "adjust_mtu" {
}

# The mtu.network.to was originally targetting 9000, and has been moved to 1350 based on the VPC/IBM Cloud configurations.
# we previously supported OpenShiftSDN since it's deprecation we have removed it from automation.
provisioner "remote-exec" {
inline = [<<EOF
export HTTPS_PROXY="http://${var.vpc_support_server_ip}:3128"
if [ "$(oc get Network.config cluster -o jsonpath='{.status.networkType}')" == "OpenShiftSDN" ]
then
FIRST_NODE=$(oc get nodes --no-headers | awk '{print $1}' | head -n1)
SOURCE_MTU=$(oc debug node/$${FIRST_NODE} -- chroot /host ip link 2>&1 | grep mtu | grep -v DOWN | grep tun0 | awk '{print $5}')
oc patch Network.operator.openshift.io cluster --type=merge --patch \
'{"spec": { "migration": { "mtu": { "network": { "from": '$${SOURCE_MTU}', "to": 1350 } , "machine": { "to" : 9100} } } } }'
else
oc patch Network.operator.openshift.io cluster --type=merge --patch \
oc patch Network.operator.openshift.io cluster --type=merge --patch \
'{"spec": { "migration": { "mtu": { "network": { "from": 1400, "to": 1350 } , "machine": { "to" : 9100} } } } }'
fi
EOF
]
}
Expand Down

0 comments on commit a74e493

Please sign in to comment.