Skip to content

Commit

Permalink
Check cluster info if it's not created within timeout (#1106)
Browse files Browse the repository at this point in the history
* Increase cluster wait timeout to 25 minutes

* Check shoot if it's not created in 17 minutes

* Add missing set
  • Loading branch information
werdes72 authored Nov 6, 2024
1 parent f46a33f commit 8fe3404
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions hack/ci/provision-gardener.sh
Original file line number Diff line number Diff line change
Expand Up @@ -73,11 +73,19 @@ until (echo "$shoot_template" | kubectl --kubeconfig "${GARDENER_KUBECONFIG}" ap
echo "failed, retrying in 15s"
sleep 15
done

echo "waiting fo cluster to be ready..."
kubectl wait --kubeconfig "${GARDENER_KUBECONFIG}" --for=condition=EveryNodeReady "shoot/${CLUSTER_NAME}" --timeout=17m
set +e
kubectl wait --kubeconfig "${GARDENER_KUBECONFIG}" --for=condition=EveryNodeReady "shoot/${CLUSTER_NAME}" --timeout=17m
if [ $? -ne 0 ]; then
echo "Cluster did not become ready in time"
kubectl --kubeconfig "${GARDENER_KUBECONFIG}" get shoot "${CLUSTER_NAME}" -o yaml
exit 1
fi
set -e

# create kubeconfig request, that creates a kubeconfig which is valid for one day
kubectl create --kubeconfig "${GARDENER_KUBECONFIG}" \
kubectl create --kubeconfig "${GARDENER_KUBECONFIG}" \
-f <(printf '{"spec":{"expirationSeconds":86400}}') \
--raw "/apis/core.gardener.cloud/v1beta1/namespaces/garden-${GARDENER_PROJECT_NAME}/shoots/${CLUSTER_NAME}/adminkubeconfig" | \
jq -r ".status.kubeconfig" | \
Expand Down

0 comments on commit 8fe3404

Please sign in to comment.