kubectl get to check if CRD is ready
-#!/bin/sh
+#!/bin/bash
echo "setup Kalm"
echo ""
@@ -7,8 +7,14 @@ kubectl apply -f https://raw.githubusercontent.com/kalmhq/kalm/master/kalm-insta
## same as running this in code repo:
#kubectl apply -f kalm-install-operator.yaml
-echo -e "\nwaiting for installation of CRD"
-sleep 3
+CRD_READY=""
+while [ "$CRD_READY" != "True" ]
+do
+ echo -e "\nwaiting for installation of CRD..."
+ #sleep 1
+
+ CRD_READY=$(kubectl get crd kalmoperatorconfigs.install.kalm.dev -ojsonpath='{.status.conditions[?(@.type=="Established")].status}')
+done
kubectl apply -f https://raw.githubusercontent.com/kalmhq/kalm/master/kalm-install-kalmoperatorconfig.yaml
## same as running this in code repo:
