Step: ipi-conf-vsphere-vips

Using secrets from the vSphere cluster profile, the vSphere VIP setup step reserves IP addresses through IPAM and saves them to $SHARED_DIR/vips.txt for later use in creating DNS records and the install config. They are also needed in deprovisioning to release the reserved VIPs (via the ipi-deprovision-vsphere-vips step).

Container image used for this step: tools

tools resolves to an image built or imported by the ci-operator configuration (documentation).

Environment

Step exposes no environmental variables except the defaults.

Source Code

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
#!/bin/bash

set -o nounset
set -o errexit
set -o pipefail

# ensure LEASED_RESOURCE is set
if [[ -z "${LEASED_RESOURCE}" ]]; then
  echo "Failed to acquire lease"
  exit 1
fi

third_octet=$(grep -oP '[ci|qe\-discon]-segment-\K[[:digit:]]+' <(echo "${LEASED_RESOURCE}"))

echo "192.168.${third_octet}.2" >> "${SHARED_DIR}"/vips.txt
echo "192.168.${third_octet}.3" >> "${SHARED_DIR}"/vips.txt
echo "192.168.${third_octet}.0/25" >> "${SHARED_DIR}"/machinecidr.txt

echo "Reserved the following IP addresses..."
cat "${SHARED_DIR}"/vips.txt

Properties

Property Value Description
Resource requests (cpu) 10m Used in .resources.requests of the pod running this step.
Resource requests (memory) 100Mi Used in .resources.requests of the pod running this step.

GitHub Link:

https://github.com/openshift/release/blob/master/ci-operator/step-registry/ipi/conf/vsphere/vips/ipi-conf-vsphere-vips-ref.yaml

Owners:

Approvers:

Source code for this page located on GitHub