Skip to content

Commit 119610c

Browse files
committed
add waits
1 parent e348fbd commit 119610c

2 files changed

Lines changed: 14 additions & 4 deletions

File tree

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

Lines changed: 7 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,10 @@ exit 1
4548
;;
4649
esac
4750

51+
# As of SDP 26.3 CRDs are managed by the operator not helm, so there should be an initial delay
52+
# to allow the CRDs to be detected
53+
sleep 10
54+
4855
echo "Creating Zookeeper cluster"
4956
# tag::install-zk[]
5057
kubectl apply -f zk.yaml
@@ -55,8 +62,6 @@ echo "Creating ZNode"
5562
kubectl apply -f znode.yaml
5663
# end::install-zk[]
5764

58-
59-
6065
for (( i=1; i<=15; i++ ))
6166
do
6267
echo "Waiting for ZookeeperCluster to appear ..."

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

Lines changed: 7 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,10 @@ exit 1
4548
;;
4649
esac
4750

51+
# As of SDP 26.3 CRDs are managed by the operator not helm, so there should be an initial delay
52+
# to allow the CRDs to be detected
53+
sleep 10
54+
4855
echo "Creating Zookeeper cluster"
4956
# tag::install-zk[]
5057
kubectl apply -f zk.yaml
@@ -55,8 +62,6 @@ echo "Creating ZNode"
5562
kubectl apply -f znode.yaml
5663
# end::install-zk[]
5764

58-
59-
6065
for (( i=1; i<=15; i++ ))
6166
do
6267
echo "Waiting for ZookeeperCluster to appear ..."

0 commit comments

Comments
 (0)