mirror of
https://github.com/kata-containers/kata-containers.git
synced 2025-06-24 06:27:39 +00:00
ci: k8s: Cleanup cluster before deleting it
This will help us to in two fronts: * catching possible issues related to kata-deploy cleanup * do more (like, in the future, collect logs) after the tests run Signed-off-by: Fabiano Fidêncio <fabiano.fidencio@intel.com>
This commit is contained in:
parent
38a7b5325f
commit
81f99543ec
@ -152,6 +152,10 @@ function cleanup() {
|
||||
kubectl delete ${cleanup_spec}
|
||||
kubectl delete -f "${tools_dir}/packaging/kata-deploy/kata-rbac/base/kata-rbac.yaml"
|
||||
kubectl delete -f "${tools_dir}/packaging/kata-deploy/runtimeclasses/kata-runtimeClasses.yaml"
|
||||
|
||||
if [ "${platform}" = "aks" ]; then
|
||||
delete_cluster
|
||||
fi
|
||||
}
|
||||
|
||||
function delete_cluster() {
|
||||
@ -190,7 +194,7 @@ function main() {
|
||||
cleanup-sev) cleanup "sev" ;;
|
||||
cleanup-snp) cleanup "snp" ;;
|
||||
cleanup-tdx) cleanup "tdx" ;;
|
||||
delete-cluster) delete_cluster ;;
|
||||
delete-cluster) cleanup "aks" ;;
|
||||
*) >&2 echo "Invalid argument"; exit 2 ;;
|
||||
esac
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user