Skip to content

Commit 62d2900

Browse files
authored
fix(docs): Update getting-started script pre-26.3.0 (#765)
* add waits * improved wait condition
1 parent c536653 commit 62d2900

2 files changed

Lines changed: 12 additions & 4 deletions

File tree

docs/modules/hdfs/examples/getting_started/getting_started.sh

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,9 @@ then
1515
exit 1
1616
fi
1717

18+
echo "Waiting for node(s) to be ready..."
19+
kubectl wait node --all --for=condition=Ready --timeout=120s
20+
1821
cd "$(dirname "$0")"
1922

2023
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 hdfsclusters.hdfs.stackable.tech >/dev/null 2>&1; do echo "Waiting for CRDs to be installed" && sleep 1; done
53+
4854
echo "Creating Zookeeper cluster"
4955
# tag::install-zk[]
5056
kubectl apply -f zk.yaml
@@ -55,8 +61,6 @@ echo "Creating ZNode"
5561
kubectl apply -f znode.yaml
5662
# end::install-zk[]
5763

58-
59-
6064
for (( i=1; i<=15; i++ ))
6165
do
6266
echo "Waiting for ZookeeperCluster to appear ..."

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

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,9 @@ then
1515
exit 1
1616
fi
1717

18+
echo "Waiting for node(s) to be ready..."
19+
kubectl wait node --all --for=condition=Ready --timeout=120s
20+
1821
cd "$(dirname "$0")"
1922

2023
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 hdfsclusters.hdfs.stackable.tech >/dev/null 2>&1; do echo "Waiting for CRDs to be installed" && sleep 1; done
53+
4854
echo "Creating Zookeeper cluster"
4955
# tag::install-zk[]
5056
kubectl apply -f zk.yaml
@@ -55,8 +61,6 @@ echo "Creating ZNode"
5561
kubectl apply -f znode.yaml
5662
# end::install-zk[]
5763

58-
59-
6064
for (( i=1; i<=15; i++ ))
6165
do
6266
echo "Waiting for ZookeeperCluster to appear ..."

0 commit comments

Comments
 (0)