diff --git a/docs/modules/opa/examples/getting_started/getting_started.sh b/docs/modules/opa/examples/getting_started/getting_started.sh index 62cdf1b6..5d69ddd5 100755 --- a/docs/modules/opa/examples/getting_started/getting_started.sh +++ b/docs/modules/opa/examples/getting_started/getting_started.sh @@ -17,6 +17,9 @@ then exit 1 fi +echo "Waiting for node(s) to be ready..." +kubectl wait node --all --for=condition=Ready --timeout=120s + case "$1" in "helm") echo "Installing operators with Helm" @@ -36,6 +39,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 opaclusters.opa.stackable.tech >/dev/null 2>&1; do echo "Waiting for CRDs to be installed" && sleep 1; done + echo "Creating OPA cluster" # tag::apply-opa-cluster[] kubectl apply -f opa.yaml diff --git a/docs/modules/opa/examples/getting_started/getting_started.sh.j2 b/docs/modules/opa/examples/getting_started/getting_started.sh.j2 index 9045bfc7..9d066051 100755 --- a/docs/modules/opa/examples/getting_started/getting_started.sh.j2 +++ b/docs/modules/opa/examples/getting_started/getting_started.sh.j2 @@ -17,6 +17,9 @@ then exit 1 fi +echo "Waiting for node(s) to be ready..." +kubectl wait node --all --for=condition=Ready --timeout=120s + case "$1" in "helm") echo "Installing operators with Helm" @@ -36,6 +39,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 opaclusters.opa.stackable.tech >/dev/null 2>&1; do echo "Waiting for CRDs to be installed" && sleep 1; done + echo "Creating OPA cluster" # tag::apply-opa-cluster[] kubectl apply -f opa.yaml diff --git a/docs/modules/opa/examples/getting_started/opa.yaml.j2 b/docs/modules/opa/examples/getting_started/opa.yaml.j2 index 645c24b3..d486deaa 100644 --- a/docs/modules/opa/examples/getting_started/opa.yaml.j2 +++ b/docs/modules/opa/examples/getting_started/opa.yaml.j2 @@ -5,7 +5,7 @@ metadata: name: simple-opa spec: image: - productVersion: "1.8.0" + productVersion: "1.12.3" servers: roleGroups: default: {}