Skip to content

Commit 1705b8a

Browse files
Improved wait conditions for Operator deployments
1 parent cc062e0 commit 1705b8a

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

Makefile

+5-2
Original file line numberDiff line numberDiff line change
@@ -481,8 +481,9 @@ install-rhoai-operator: ## Install RHOAI Operator
481481
kubectl create -f contrib/configuration/rhoai/rhoai-operator-subscription.yaml
482482
@echo Waiting for rhoai-operator Subscription to be ready
483483
kubectl wait -n redhat-ods-operator subscription/rhods-operator --for=jsonpath='{.status.state}'=AtLatestKnown --timeout=180s
484+
@while [[ -z $$(kubectl get deployment/rhods-operator -n redhat-ods-operator) ]]; do echo "."; sleep 10; done
484485
-export RHOAI_POD_NAME=`kubectl get -n redhat-ods-operator pod -o custom-columns=:metadata.name | grep rhods-operator`; \
485-
kubectl wait --for='jsonpath={.status.conditions[?(@.type=="Ready")].status}=True' pod/$$RHOAI_POD_NAME -n redhat-ods-operator
486+
kubectl wait --for=condition=Ready pod/$$RHOAI_POD_NAME -n redhat-ods-operator
486487
@echo -e "\n==> Creating default Data Science Cluster \n"
487488
kubectl apply -f contrib/configuration/rhoai/default-dsci.yaml --server-side
488489
kubectl apply -f contrib/configuration/rhoai/default-dsc.yaml --server-side
@@ -506,9 +507,10 @@ install-opendatahub-operator: ## Install OpenDataHub operator
506507
kubectl create -f contrib/configuration/odh/opendatahub-operator-subscription.yaml
507508
@echo Waiting for opendatahub-operator Subscription to be ready
508509
kubectl wait -n openshift-operators subscription/opendatahub-operator --for=jsonpath='{.status.state}'=AtLatestKnown --timeout=180s
510+
@while [[ -z $$(kubectl get deployment/opendatahub-operator-controller-manager -n openshift-operators) ]]; do echo "."; sleep 10; done
509511
kubectl wait --for=condition=available deployment/opendatahub-operator-controller-manager -n openshift-operators --timeout=180s
510512
-export ODH_POD_NAME=`kubectl get -n openshift-operators pod -o custom-columns=:metadata.name | grep opendatahub-operator-controller-manager`; \
511-
kubectl wait --for='jsonpath={.status.conditions[?(@.type=="Ready")].status}=True' pod/$$ODH_POD_NAME -n openshift-operators
513+
kubectl wait --for=condition=Ready pod/$$ODH_POD_NAME -n openshift-operators
512514
kubectl apply -f contrib/configuration/odh/default-dsci.yaml --server-side
513515
kubectl apply -f contrib/configuration/odh/default-dsc.yaml --server-side
514516

@@ -524,6 +526,7 @@ install-service-mesh-operator: ## Install Service Mesh Operator
524526
@echo -e "\n==> Installing OpenShift Service Mesh Operator"
525527
kubectl create -f contrib/configuration/service-mesh-operator-subscription.yaml
526528
kubectl wait -n openshift-operators subscription/servicemeshoperator --for=jsonpath='{.status.state}'=AtLatestKnown --timeout=180s
529+
@while [[ -z $$(kubectl get deployment/istio-operator -n openshift-operators) ]]; do echo "."; sleep 10; done
527530
kubectl wait --for=condition=available deployment/istio-operator -n openshift-operators --timeout=180s
528531

529532
##@ GPU Support

0 commit comments

Comments
 (0)