Skip to content

Commit

Permalink
correct CONTROL_ARCH and CONTROL_ARCH when OCP_ARCH is set (openshift…
Browse files Browse the repository at this point in the history
  • Loading branch information
jianlinliu authored and aviavraham committed Jul 22, 2024
1 parent 112f8bc commit 5877e88
Showing 1 changed file with 9 additions and 7 deletions.
16 changes: 9 additions & 7 deletions ci-operator/step-registry/ipi/conf/gcp/ipi-conf-gcp-commands.sh
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ fi
# Do not change the default family type without consulting with cloud financial operations as their may
# be active savings plans targeting this machine class.
master_type=""

control_plane_arch="${CONTROL_ARCH:-${OCP_ARCH}}"
case "${SIZE_VARIANT}" in
"xlarge")
master_type_suffix="standard-32"
Expand All @@ -32,7 +32,7 @@ case "${SIZE_VARIANT}" in
master_type_suffix="standard-8"
;;
*)
if [[ "${CONTROL_ARCH}" == "arm64" ]]; then
if [[ "${control_plane_arch}" == "arm64" ]]; then
master_type_suffix="standard-4"
else
# Temporary test to see if this helps the consistent high CPU alerts and random test failures
Expand All @@ -43,28 +43,30 @@ case "${SIZE_VARIANT}" in
;;
esac

if [[ "${CONTROL_ARCH}" == "amd64" ]]; then
if [[ "${control_plane_arch}" == "amd64" ]]; then
master_type="e2-${master_type_suffix}"
elif [[ "${CONTROL_ARCH}" == "arm64" ]]; then
elif [[ "${control_plane_arch}" == "arm64" ]]; then
master_type="t2a-${master_type_suffix}"
fi

compute_arch="${COMPUTE_ARCH:-${OCP_ARCH}}"
if [[ -z "${COMPUTE_NODE_TYPE}" ]]; then
if [[ "${COMPUTE_ARCH}" == "arm64" ]]; then
if [[ "${compute_arch}" == "arm64" ]]; then
COMPUTE_NODE_TYPE="t2a-standard-4"
else
COMPUTE_NODE_TYPE="e2-standard-4"
fi
fi


cat >> "${CONFIG}" << EOF
baseDomain: ${GCP_BASE_DOMAIN}
platform:
gcp:
projectID: ${GCP_PROJECT}
region: ${GCP_REGION}
controlPlane:
architecture: ${CONTROL_ARCH:-${OCP_ARCH}}
architecture: ${control_plane_arch}
name: master
platform:
gcp:
Expand All @@ -74,7 +76,7 @@ controlPlane:
diskSizeGB: 200
replicas: ${masters}
compute:
- architecture: ${COMPUTE_ARCH:-${OCP_ARCH}}
- architecture: ${compute_arch}
name: worker
replicas: ${workers}
platform:
Expand Down

0 comments on commit 5877e88

Please sign in to comment.