Step: storage-conf-wait-for-csi-driver

The storage-conf-wait-for-csi-driver step waits for a given CSI driver to be fully deployed. Since each ClusterCSIDriver uses different conditions, list of the conditions to wait for must be provided. Unfortunately, it's not possible to wait for a condition to get False, e.g. Progressing=False. The driver may not be fully deployed, however, at least one node has the CSI driver installed.

Container image used for this step: tests

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

Environment

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

Variable Name Type Variable Content
CLUSTERCSIDRIVER Parameter[?] Name of ClusterCSIDriver instance to watch.
TRUECONDITIONS Parameter[?] Space-separated list of conditions that must be True.

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
#!/bin/bash
set -o errexit
set -o nounset
set -o pipefail

set -x

echo "Waiting for the ClusterCSIDriver $CLUSTERCSIDRIVER to get created"
while true; do
    oc get clustercsidriver $CLUSTERCSIDRIVER -o yaml && break
    sleep 5
done

ARGS=""
for CND in $TRUECONDITIONS; do
    ARGS="$ARGS --for=condition=$CND"
done

echo "Waiting for the ClusterCSIDriver $CLUSTERCSIDRIVER conditions $ARGS"
if ! oc wait --timeout=300s $ARGS clustercsidriver $CLUSTERCSIDRIVER; then
    # Wait failed
    echo "Wait failed. Current ClusterCISDriver:"
    oc get clustercsidriver $CLUSTERCSIDRIVER -o yaml
    exit 1
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/storage/conf/wait-for-csi-driver/storage-conf-wait-for-csi-driver-ref.yaml

Owners:

Approvers:

Reviewers:

Source code for this page located on GitHub