7272 # wait for a while to be sure CRDs are installed
7373 sleep 1
7474 kubectl create -f https://github.com/operator-framework/operator-lifecycle-manager/releases/download/${OLM_VERSION}/olm.yaml
75+ echo Wait for default CatalogSource to start
76+ kubectl wait -n ${{ env.CATALOG_SOURCE_NAMESPACE }} catalogsource/${{ env.CATALOG_SOURCE_NAME }} --for=jsonpath='{.status.connectionState.lastObservedState}'=READY --timeout=180s
77+ env :
78+ CATALOG_SOURCE_NAME : " operatorhubio-catalog"
79+ CATALOG_SOURCE_NAMESPACE : " olm"
7580
7681 - name : Create openshift-operator namespace and OperatorGroup
7782 run : |
@@ -87,15 +92,18 @@ jobs:
8792 envsubst < .github/resources-olm-upgrade/subscription.yaml > ${{ env.TEMP_DIR }}/subscription.yaml
8893
8994 kubectl create -f ${{ env.TEMP_DIR }}/catalogsource.yaml
90- make wait-for-catalog-source
95+
96+ echo Wait for CatalogSource ${{ env.CATALOG_SOURCE_NAME }} to start
97+ kubectl wait -n ${{ env.CATALOG_SOURCE_NAMESPACE }} catalogsource/${{ env.CATALOG_SOURCE_NAME }} --for=jsonpath='{.status.connectionState.lastObservedState}'=READY --timeout=180s
9198
9299 kubectl create -f ${{ env.TEMP_DIR }}/subscription.yaml
93100
94101 echo Waiting for Subscription to be ready
95- make wait- for-subscription
102+ kubectl wait -n ${{ env.SUBSCRIPTION_NAMESPACE }} subscription/${{ env.SUBSCRIPTION_NAME }} -- for=jsonpath='{.status.state}'=AtLatestKnown --timeout=180s
96103
97104 echo Waiting for Deployment to be ready
98- make wait-for-deployment -e TIMEOUT=60 -e DEPLOYMENT_NAME="codeflare-operator-manager" -e DEPLOYMENT_NAMESPACE="openshift-operators"
105+ timeout 60 bash -c 'until [[ $(kubectl get deployment/codeflare-operator-manager -n '${{ env.SUBSCRIPTION_NAMESPACE }}') ]]; do sleep 5 && echo "$(kubectl get deployment/codeflare-operator-manager -n '${{ env.SUBSCRIPTION_NAMESPACE }}')"; done'
106+ kubectl wait -n ${{ env.SUBSCRIPTION_NAMESPACE }} deployment/codeflare-operator-manager --for=condition=Available=true --timeout=60s
99107 env :
100108 CATALOG_SOURCE_NAME : " codeflare-olm-test"
101109 CATALOG_SOURCE_NAMESPACE : " olm"
@@ -138,10 +146,11 @@ jobs:
138146 kubectl wait --timeout=120s --for=delete pod/${ORIGINAL_POD_NAME} -n openshift-operators
139147
140148 echo Waiting for Subscription to be ready
141- make wait- for-subscription
149+ kubectl wait -n ${{ env.SUBSCRIPTION_NAMESPACE }} subscription/${{ env.SUBSCRIPTION_NAME }} -- for=jsonpath='{.status.state}'=AtLatestKnown --timeout=180s
142150
143151 echo Waiting for Deployment to be ready
144- make wait-for-deployment -e TIMEOUT=60 -e DEPLOYMENT_NAME="codeflare-operator-manager" -e DEPLOYMENT_NAMESPACE="openshift-operators"
152+ timeout 60 bash -c 'until [[ $(kubectl get deployment/codeflare-operator-manager -n '${{ env.SUBSCRIPTION_NAMESPACE }}') ]]; do sleep 5 && echo "$(kubectl get deployment/codeflare-operator-manager -n '${{ env.SUBSCRIPTION_NAMESPACE }}')"; done'
153+ kubectl wait -n ${{ env.SUBSCRIPTION_NAMESPACE }} deployment/codeflare-operator-manager --for=condition=Available=true --timeout=60s
145154
146155 echo Checking that correct CSV is available
147156 CSV_VERSION=$(kubectl get ClusterServiceVersion/codeflare-operator.${VERSION} -n openshift-operators -o json | jq -r .spec.version)
0 commit comments