Skip to content

Commit 5c56bf8

Browse files
committed
chore: Add wait conditions to getting-started script
1 parent be348d3 commit 5c56bf8

2 files changed

Lines changed: 12 additions & 0 deletions

File tree

docs/modules/opa/examples/getting_started/getting_started.sh

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,9 @@ then
1717
exit 1
1818
fi
1919

20+
echo "Waiting for node(s) to be ready..."
21+
kubectl wait node --all --for=condition=Ready --timeout=120s
22+
2023
case "$1" in
2124
"helm")
2225
echo "Installing operators with Helm"
@@ -36,6 +39,9 @@ exit 1
3639
;;
3740
esac
3841

42+
# TODO: Remove once https://github.com/stackabletech/issues/issues/828 has been implemented (see that issue for details).
43+
until kubectl get crd opaclusters.opa.stackable.tech >/dev/null 2>&1; do echo "Waiting for CRDs to be installed" && sleep 1; done
44+
3945
echo "Creating OPA cluster"
4046
# tag::apply-opa-cluster[]
4147
kubectl apply -f opa.yaml

docs/modules/opa/examples/getting_started/getting_started.sh.j2

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,9 @@ then
1717
exit 1
1818
fi
1919

20+
echo "Waiting for node(s) to be ready..."
21+
kubectl wait node --all --for=condition=Ready --timeout=120s
22+
2023
case "$1" in
2124
"helm")
2225
echo "Installing operators with Helm"
@@ -36,6 +39,9 @@ exit 1
3639
;;
3740
esac
3841

42+
# TODO: Remove once https://github.com/stackabletech/issues/issues/828 has been implemented (see that issue for details).
43+
until kubectl get crd opaclusters.opa.stackable.tech >/dev/null 2>&1; do echo "Waiting for CRDs to be installed" && sleep 1; done
44+
3945
echo "Creating OPA cluster"
4046
# tag::apply-opa-cluster[]
4147
kubectl apply -f opa.yaml

0 commit comments

Comments
 (0)