mirror of
https://github.com/edgelesssys/constellation.git
synced 2025-02-03 02:50:03 -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' }}
|
if: ${{ inputs.isDebugImage == 'true' }}
|
||||||
|
|
||||||
- name: Constellation init
|
- name: Constellation init
|
||||||
|
id: constellation-init
|
||||||
run: |
|
run: |
|
||||||
if [ ${{ inputs.autoscale }} = true ]; then autoscale=--autoscale; fi
|
if [ ${{ inputs.autoscale }} = true ]; then autoscale=--autoscale; fi
|
||||||
constellation init ${autoscale}
|
constellation init ${autoscale}
|
||||||
|
echo "::set-output name=KUBECONFIG::$(pwd)/constellation-admin.conf"
|
||||||
shell: bash
|
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
|
- name: Download boot logs
|
||||||
run: |
|
run: |
|
||||||
echo "::group::Download boot logs"
|
echo "::group::Download boot logs"
|
||||||
|
Loading…
x
Reference in New Issue
Block a user