mirror of
https://github.com/edgelesssys/constellation.git
synced 2025-01-23 13:51:06 -05:00
e2e test: wait for specified amount of nodes to join the cluster and become ready (#87)
Co-authored-by: Nils Hanke <Nirusu@users.noreply.github.com>
This commit is contained in:
parent
56accc7766
commit
aa75a065d7
25
.github/actions/constellation_create/action.yml
vendored
25
.github/actions/constellation_create/action.yml
vendored
@ -155,11 +155,36 @@ runs:
|
||||
if: ${{ inputs.isDebugImage == 'true' }}
|
||||
|
||||
- name: Constellation init
|
||||
id: constellation-init
|
||||
run: |
|
||||
if [ ${{ inputs.autoscale }} = true ]; then autoscale=--autoscale; fi
|
||||
constellation init ${autoscale}
|
||||
echo "::set-output name=KUBECONFIG::$(pwd)/constellation-admin.conf"
|
||||
shell: bash
|
||||
|
||||
- name: Wait for nodes to join and become ready
|
||||
run: |
|
||||
echo "::group::Wait for nodes"
|
||||
NODES_COUNT=$((${{ inputs.controlNodesCount }} + ${{ inputs.workerNodesCount }}))
|
||||
JOINWAIT=0
|
||||
until [ "$(kubectl get nodes -o json | jq '.items | length')" == "${NODES_COUNT}" ] || [ $JOINWAIT -gt $JOINTIMEOUT ];
|
||||
do
|
||||
echo "$(kubectl get nodes -o json | jq '.items | length')/"${NODES_COUNT}" nodes have joined.. waiting.."
|
||||
JOINWAIT=$((JOINWAIT+30))
|
||||
sleep 30
|
||||
done
|
||||
if [ $JOINWAIT -gt $JOINTIMEOUT ]; then
|
||||
echo "Timed out waiting for nodes to join"
|
||||
exit 1
|
||||
fi
|
||||
echo "$(kubectl get nodes -o json | jq '.items | length')/"${NODES_COUNT}" nodes have joined"
|
||||
kubectl wait --for=condition=ready --all nodes --timeout=10m
|
||||
echo "::endgroup::"
|
||||
shell: bash
|
||||
env:
|
||||
KUBECONFIG: "${{ steps.constellation-init.outputs.KUBECONFIG }}"
|
||||
JOINTIMEOUT: "1200" # 20 minutes timeout for all nodes to join
|
||||
|
||||
- name: Download boot logs
|
||||
run: |
|
||||
echo "::group::Download boot logs"
|
||||
|
Loading…
Reference in New Issue
Block a user