Add CI action to install CSI drivers

This commit is contained in:
Christoph Meyer 2022-10-27 14:57:54 +00:00 committed by cm
parent ad15c7f84d
commit 94429c8db8
5 changed files with 69 additions and 26 deletions

View file

@ -1,8 +1,30 @@
name: Constellation destroy
description: "Destroy a running Constellation cluster."
runs:
using: 'composite'
using: "composite"
steps:
- name: Constellation terminate
run: constellation terminate --yes
shell: bash
- name: Delete PVs
shell: bash
run: |
ELAPSED=0
kubectl delete pvc --all --wait=true || true
echo "::group::Wait for PV deletion"
until [ "$(kubectl get pv -o json | jq '.items | length')" == "0" ] || [ $ELAPSED -gt $PV_DELETION_TIMEOUT ];
do
echo $(kubectl get pv -o json | jq '.items | length') PV remaining..
sleep 1
ELAPSED=$((ELAPSED+1))
done
if [ $ELAPSED -gt $PV_DELETION_TIMEOUT ]; then
echo "Timed out waiting for PV deletion.."
exit 1
fi
echo "::endgroup::"
env:
KUBECONFIG: ${{ github.workspace }}/constellation-admin.conf
PV_DELETION_TIMEOUT: "120" # 2 minutes timeout for pv deletion
- name: Constellation terminate
run: constellation terminate --yes
shell: bash