From 8353aae41a279865725195c64e13d063e9e96a23 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fabiano=20Fid=C3=AAncio?= Date: Wed, 26 Jul 2023 21:48:18 +0200 Subject: [PATCH] ci: k8s: Rework get_nodes_and_pods_info() MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The amount of info we've added seemed unnecessary, and ends up making our lives even harder when trying to find errors. Let's just rely on the kata-debug container to collect the needed info for us. Signed-off-by: Fabiano FidĂȘncio --- tests/integration/kubernetes/gha-run.sh | 17 +---------------- 1 file changed, 1 insertion(+), 16 deletions(-) diff --git a/tests/integration/kubernetes/gha-run.sh b/tests/integration/kubernetes/gha-run.sh index 353dc3ba2f..0d02e70820 100755 --- a/tests/integration/kubernetes/gha-run.sh +++ b/tests/integration/kubernetes/gha-run.sh @@ -130,7 +130,7 @@ function cleanup() { ensure_yq echo "Gather information about the nodes and pods before cleaning up the node" - get_nodes_and_pods_info "yes" + get_nodes_and_pods_info if [ "${platform}" = "aks" ]; then delete_cluster @@ -173,21 +173,6 @@ function delete_cluster() { } function get_nodes_and_pods_info() { - describe_pods="${1:-"no"}" - - echo "::group::Get node information" - kubectl get nodes -o wide --show-labels=true - echo "::endgroup::" - echo "" - echo "::group::Get all the pods running" - kubectl get pods -A - echo "::endgroup::" - echo "" - if [[ "${describe_pods}" == "yes" ]]; then - echo "::group::Describe all the pods" - kubectl describe pods -A - echo "::endgroup::" - fi kubectl debug $(kubectl get nodes -o name) -it --image=quay.io/kata-containers/kata-debug:latest kubectl get pods -o name | grep node-debugger | xargs kubectl delete }