mirror of
https://github.com/kata-containers/kata-containers.git
synced 2025-04-29 20:24:31 +00:00
gha: tdx: Delete kata-deploy after the tests finish
We must ensure that no kata-deploy is left behind after the tests finish, otherwise it may interfere with the next run. Fixes: #6647 Signed-off-by: Fabiano Fidêncio <fabiano.fidencio@intel.com>
This commit is contained in:
parent
da35241a91
commit
d7fdf19e9b
18
.github/workflows/run-k8s-tests-on-tdx.yaml
vendored
18
.github/workflows/run-k8s-tests-on-tdx.yaml
vendored
@ -48,3 +48,21 @@ jobs:
|
||||
env:
|
||||
KATA_HYPERVISOR: ${{ matrix.vmm }}
|
||||
KUBECONFIG: /etc/rancher/k3s/k3s.yaml
|
||||
|
||||
- name: Delete kata-deploy
|
||||
if: always()
|
||||
run: |
|
||||
kubectl delete -f tools/packaging/kata-deploy/kata-deploy/base/kata-deploy.yaml
|
||||
kubectl -n kube-system wait --timeout=10m --for=delete -l name=kata-deploy pod
|
||||
|
||||
sed -i -e "s|quay.io/kata-containers/kata-deploy:latest|${{ inputs.registry }}/${{ inputs.repo }}:${{ inputs.tag }}|g" tools/packaging/kata-deploy/kata-cleanup/base/kata-cleanup.yaml
|
||||
cat tools/packaging/kata-deploy/kata-cleanup/base/kata-cleanup.yaml
|
||||
cat tools/packaging/kata-deploy/kata-cleanup/base/kata-cleanup.yaml | grep "${{ inputs.registry }}/${{ inputs.repo }}:${{ inputs.tag }}" || die "Failed to setup the tests image"
|
||||
kubectl apply -f tools/packaging/kata-deploy/kata-cleanup/base/kata-cleanup.yaml
|
||||
sleep 180s
|
||||
|
||||
kubectl delete -f tools/packaging/kata-deploy/kata-cleanup/base/kata-cleanup.yaml
|
||||
kubectl delete -f tools/packaging/kata-deploy/kata-rbac/base/kata-rbac.yaml
|
||||
kubectl delete -f tools/packaging/kata-deploy/runtimeclasses/kata-runtimeClasses.yaml
|
||||
env:
|
||||
KUBECONFIG: /etc/rancher/k3s/k3s.yaml
|
||||
|
Loading…
Reference in New Issue
Block a user