Step: ipi-conf-gcp

This step configures an install-config.yaml file to depoloy to the GCP CI project. An existing install-config.yaml file should already exist in the shared directory. The file is modified to configure the cluster to run in the GCP CI project. The resulting file remains in the shared directory for future consumption.

Container image used for this step: origin/centos:8

origin/centos:8 resolves to an image imported from the specified imagestream tag on the build farm (documentation).

Environment

In addition to the default environment, the step exposes the following:

Variable Name Type Variable Content
CONTROL_PLANE_REPLICAS Parameter[?] The number of control plane nodes to create for the cluster. This variable should only be supplied in consultation with the etcd team. The etcd operator has to explicitly support the specified number of control plane nodes and values not documented below will result in unhealthy and/or unsupportable clusters. Valid values include: * "" (default) - 3 control plane nodes. The standard for stand-alone clusters. * "1" - Supportable for single-node OpenShift (SNO). * "5" - Supportable only for select customers. (default: 3)
SIZE_VARIANT Parameter[?] The size of the cluster in one of our supported t-shirt values that is standard across all CI environments. The sizes are: * "" (default) - 4 vCPU, 16GB control plane nodes, default workers * "compact" - 8 vCPU, 32GB control plane nodes, no workers * "large" - 16 vCPU, 64GB+ control plane nodes, default workers, suitable for clusters up to 250 nodes * "xlarge" - 32 vCPU, 128GB+ control plane nodes, default workers, suitable for clusters up to 1000 nodes These sizes are roughly consistent across all cloud providers, but we may not be able to instantiate some sizes in some regions or accounts due to quota issues.
COMPUTE_NODE_TYPE Parameter[?] The instance type to use for compute nodes (e.g. GCP https://cloud.google.com/compute/docs/machine-types). We use a 4 core worker to match the median configuration of the fleet. (default: n1-standard-4)
RT_ENABLED Parameter[?] This flag forces the installation of real-time kernel to worker nodes. (default: false)

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
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
#!/bin/bash

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

CONFIG="${SHARED_DIR}/install-config.yaml"

GCP_BASE_DOMAIN="$(< ${CLUSTER_PROFILE_DIR}/public_hosted_zone)"
GCP_PROJECT="$(< ${CLUSTER_PROFILE_DIR}/openshift_gcp_project)"
GCP_REGION="${LEASED_RESOURCE}"

masters="${CONTROL_PLANE_REPLICAS}"

workers=3
if [[ "${SIZE_VARIANT}" == "compact" ]]; then
  workers=0
fi
master_type=null
if [[ "${SIZE_VARIANT}" == "xlarge" ]]; then
  master_type=n1-standard-32
elif [[ "${SIZE_VARIANT}" == "large" ]]; then
  master_type=n1-standard-16
elif [[ "${SIZE_VARIANT}" == "compact" ]]; then
  master_type=n1-standard-8
fi

cat >> "${CONFIG}" << EOF
baseDomain: ${GCP_BASE_DOMAIN}
platform:
  gcp:
    projectID: ${GCP_PROJECT}
    region: ${GCP_REGION}
controlPlane:
  name: master
  platform:
    gcp:
      type: ${master_type}
  replicas: ${masters}
compute:
- name: worker
  replicas: ${workers}
  platform:
    gcp:
      type: ${COMPUTE_NODE_TYPE}
EOF

if [ ${RT_ENABLED} = "true" ]; then
	cat > "${SHARED_DIR}/manifest_mc-kernel-rt.yml" << EOF
apiVersion: machineconfiguration.openshift.io/v1
kind: MachineConfig
metadata:
  labels:
    machineconfiguration.openshift.io/role: worker
  name: realtime-worker
spec:
  kernelType: realtime
EOF
fi

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/gcp/ipi-conf-gcp-ref.yaml

Owners:

Approvers:

Source code for this page located on GitHub