Step: ipi-conf-ovirt-generate-install-config-params

This step creates the ovirt-lease.conf file to configure the parameters for creating the install-config file. The step uses a secret from the oVirt namespace that corresponds to the acquired lease name, which contains the parameters required for creating the install-config.yaml file for the cluster.

Container image used for this step: ocp/cli-jq:latest

ocp/cli-jq:latest resolves to an image imported from the specified imagestream tag on the build farm (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
21
22
23
24
25
26
27
28
29
30
31
#!/bin/bash

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

function extract_leases_info() {
    echo "$( jq ."${1}" --raw-output "${2}" )"
}

lease_path="${CLUSTER_PROFILE_DIR}/${LEASED_RESOURCE}.json"
storage_domain_id="$(extract_leases_info ovirt_storage_domain_id ${lease_path})"
if [[ -n ${OVIRT_UPGRADE_LEASED_RESOURCE+x} ]]; then
  upgrade_lease_path="${CLUSTER_PROFILE_DIR}/${OVIRT_UPGRADE_LEASED_RESOURCE}.json"
  storage_domain_id="$(extract_leases_info ovirt_storage_domain_id ${upgrade_lease_path})"
  echo "Using storage domain ${storage_domain_id} for upgrade job"
fi

#Saving parameters for the env
cat > ${SHARED_DIR}/ovirt-lease.conf <<EOF
OVIRT_APIVIP="$(extract_leases_info ovirt_apivip ${lease_path})"
OVIRT_DNSVIP="$(extract_leases_info ovirt_dnsvip ${lease_path})"
OVIRT_INGRESSVIP="$(extract_leases_info ovirt_ingressvip ${lease_path})"
OCP_CLUSTER="$(extract_leases_info cluster_name ${lease_path})"
OVIRT_ENGINE_NETWORK="$(extract_leases_info ovirt_network_name ${lease_path})"
OVIRT_STORAGE_DOMAIN_ID="${storage_domain_id}"
WORKER_CPU="8"
WORKER_MEM="16384"
MASTER_CPU="8"
MASTER_MEM="16384"
EOF

Properties

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

GitHub Link:

https://github.com/openshift/release/blob/master/ci-operator/step-registry/ipi/conf/ovirt/generate-install-config-params/ipi-conf-ovirt-generate-install-config-params-ref.yaml

Owners:

Approvers:

Reviewers:

Source code for this page located on GitHub