From 442651ac2905dda2e36f4480cf4d18e1c4df543a Mon Sep 17 00:00:00 2001 From: Andrew Kenworthy Date: Wed, 11 Mar 2026 14:59:56 +0100 Subject: [PATCH] improve wait condition --- .../hive/examples/getting_started/getting_started.sh | 6 ++++++ .../hive/examples/getting_started/getting_started.sh.j2 | 6 ++++++ 2 files changed, 12 insertions(+) diff --git a/docs/modules/hive/examples/getting_started/getting_started.sh b/docs/modules/hive/examples/getting_started/getting_started.sh index 40a73e05..308ffb65 100755 --- a/docs/modules/hive/examples/getting_started/getting_started.sh +++ b/docs/modules/hive/examples/getting_started/getting_started.sh @@ -20,6 +20,9 @@ then exit 1 fi +echo "Waiting for node(s) to be ready..." +kubectl wait node --all --for=condition=Ready --timeout=120s + cd "$(dirname "$0")" case "$1" in @@ -93,6 +96,9 @@ exit 1 ;; esac +# TODO: Remove once https://github.com/stackabletech/issues/issues/828 has been implemented (see that issue for details). +until kubectl get crd hiveclusters.hive.stackable.tech >/dev/null 2>&1; do echo "Waiting for CRDs to be installed" && sleep 1; done + echo "Install HiveCluster" # tag::install-hive[] kubectl apply -f hive-minio-credentials.yaml diff --git a/docs/modules/hive/examples/getting_started/getting_started.sh.j2 b/docs/modules/hive/examples/getting_started/getting_started.sh.j2 index c9da403c..b00719f6 100755 --- a/docs/modules/hive/examples/getting_started/getting_started.sh.j2 +++ b/docs/modules/hive/examples/getting_started/getting_started.sh.j2 @@ -20,6 +20,9 @@ then exit 1 fi +echo "Waiting for node(s) to be ready..." +kubectl wait node --all --for=condition=Ready --timeout=120s + cd "$(dirname "$0")" case "$1" in @@ -93,6 +96,9 @@ exit 1 ;; esac +# TODO: Remove once https://github.com/stackabletech/issues/issues/828 has been implemented (see that issue for details). +until kubectl get crd hiveclusters.hive.stackable.tech >/dev/null 2>&1; do echo "Waiting for CRDs to be installed" && sleep 1; done + echo "Install HiveCluster" # tag::install-hive[] kubectl apply -f hive-minio-credentials.yaml