Skip to content

Commit

Permalink
ipi-vsphere: Require min 3 control planes nodes
Browse files Browse the repository at this point in the history
This commit adds a check to ensure that the number
of control plane replicas is at least 3 for vSphere
and documents the requirement.
  • Loading branch information
jrvaldes committed Jan 9, 2025
1 parent 83bf89f commit d2eff0b
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,13 @@ VERSION=$(oc adm release info ${TESTING_RELEASE_IMAGE} --output=json | jq -r '.m

set -o errexit

# Ensure at least 3 control planes for vSphere. Single node is not supported.
CONTROL_PLANE_REPLICAS=${CONTROL_PLANE_REPLICAS:-3}
if [ "${CONTROL_PLANE_REPLICAS}" -lt 3 ]; then
echo "CONTROL_PLANE_REPLICAS must be at least 3 for vSphere"
exit 1
fi

Z_VERSION=1000

if [ ! -z ${VERSION} ]; then
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,8 @@ ref:
- name: CONTROL_PLANE_REPLICAS
default: "3"
documentation: |-
the number of the master nodes for ipi on vsphere cluster.
the number of the master nodes for ipi on vsphere cluster. Minimum required 3. Single Node is not
supported in vSphere.
- name: COMPUTE_NODE_REPLICAS
default: "3"
documentation: |-
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,13 @@ VERSION=$(oc adm release info ${TESTING_RELEASE_IMAGE} --output=json | jq -r '.m

set -o errexit

# Ensure at least 3 control planes for vSphere. Single node is not supported.
CONTROL_PLANE_REPLICAS=${CONTROL_PLANE_REPLICAS:-3}
if [ "${CONTROL_PLANE_REPLICAS}" -lt 3 ]; then
echo "CONTROL_PLANE_REPLICAS must be at least 3 for vSphere"
exit 1
fi

Z_VERSION=1000

if [ ! -z "${VERSION}" ]; then
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,8 @@ ref:
- name: CONTROL_PLANE_REPLICAS
default: "3"
documentation: |-
the number of the master nodes for ipi on vsphere cluster.
the number of the master nodes for ipi on vsphere cluster. Minimum required 3. Single Node is not
supported in vSphere.
- name: COMPUTE_NODE_REPLICAS
default: "3"
documentation: |-
Expand Down

0 comments on commit d2eff0b

Please sign in to comment.