Skip to content

Commit 5d2d3fe

Browse files
committed
chore: Add wait conditions to getting-started script
1 parent 94e1784 commit 5d2d3fe

2 files changed

Lines changed: 12 additions & 0 deletions

File tree

docs/modules/opensearch/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
cd "$(dirname "$0")"
2124

2225
case "$1" in
@@ -45,6 +48,9 @@ exit 1
4548
;;
4649
esac
4750

51+
# TODO: Remove once https://github.com/stackabletech/issues/issues/828 has been implemented (see that issue for details).
52+
until kubectl get crd opensearchclusters.opensearch.stackable.tech >/dev/null 2>&1; do echo "Waiting for CRDs to be installed" && sleep 1; done
53+
4854
echo "Creating OpenSearch security plugin configuration"
4955
# tag::apply-security-config[]
5056
kubectl apply -f initial-opensearch-security-config.yaml

docs/modules/opensearch/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
cd "$(dirname "$0")"
2124

2225
case "$1" in
@@ -45,6 +48,9 @@ exit 1
4548
;;
4649
esac
4750

51+
# TODO: Remove once https://github.com/stackabletech/issues/issues/828 has been implemented (see that issue for details).
52+
until kubectl get crd opensearchclusters.opensearch.stackable.tech >/dev/null 2>&1; do echo "Waiting for CRDs to be installed" && sleep 1; done
53+
4854
echo "Creating OpenSearch security plugin configuration"
4955
# tag::apply-security-config[]
5056
kubectl apply -f initial-opensearch-security-config.yaml

0 commit comments

Comments
 (0)