72
72
# wait for a while to be sure CRDs are installed
73
73
sleep 1
74
74
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"
75
80
76
81
- name : Create openshift-operator namespace and OperatorGroup
77
82
run : |
@@ -87,15 +92,18 @@ jobs:
87
92
envsubst < .github/resources-olm-upgrade/subscription.yaml > ${{ env.TEMP_DIR }}/subscription.yaml
88
93
89
94
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
91
98
92
99
kubectl create -f ${{ env.TEMP_DIR }}/subscription.yaml
93
100
94
101
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
96
103
97
104
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
99
107
env :
100
108
CATALOG_SOURCE_NAME : " codeflare-olm-test"
101
109
CATALOG_SOURCE_NAMESPACE : " olm"
@@ -138,10 +146,11 @@ jobs:
138
146
kubectl wait --timeout=120s --for=delete pod/${ORIGINAL_POD_NAME} -n openshift-operators
139
147
140
148
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
142
150
143
151
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
145
154
146
155
echo Checking that correct CSV is available
147
156
CSV_VERSION=$(kubectl get ClusterServiceVersion/codeflare-operator.${VERSION} -n openshift-operators -o json | jq -r .spec.version)
0 commit comments