From d2be8eef1a43f285e4821a9807b509644ad78168 Mon Sep 17 00:00:00 2001 From: Wainer dos Santos Moschetta Date: Wed, 9 Aug 2023 16:38:58 -0300 Subject: [PATCH] ci: k8s: add cleanup-kcli() to gha-run.sh The cleanup-kcli() behaves like other clean up for bare-metal (e.g. sev, tdx...etc) except that KUBECONFIG should be exported. Fixes #7620 Signed-off-by: Wainer dos Santos Moschetta --- tests/integration/kubernetes/gha-run.sh | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/tests/integration/kubernetes/gha-run.sh b/tests/integration/kubernetes/gha-run.sh index 87436a7a62..30b542a294 100755 --- a/tests/integration/kubernetes/gha-run.sh +++ b/tests/integration/kubernetes/gha-run.sh @@ -166,6 +166,9 @@ function cleanup() { test_type="${2:-k8s}" ensure_yq + [ "$platform" = "kcli" ] && \ + export KUBECONFIG="$HOME/.kcli/clusters/${CLUSTER_NAME:-kata-k8s}/auth/kubeconfig" + echo "Gather information about the nodes and pods before cleaning up the node" get_nodes_and_pods_info @@ -231,6 +234,7 @@ function main() { deploy-kata-tdx) deploy_kata "tdx" ;; deploy-kata-garm) deploy_kata "garm" ;; run-tests) run_tests ;; + cleanup-kcli) cleanup "kcli" ;; cleanup-sev) cleanup "sev" ;; cleanup-snp) cleanup "snp" ;; cleanup-tdx) cleanup "tdx" ;;