Skip to content

Commit

Permalink
ci: k8s: Rework get_nodes_and_pods_info()
Browse files Browse the repository at this point in the history
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 <fabiano.fidencio@intel.com>
  • Loading branch information
fidencio committed Jul 28, 2023
1 parent 6ad5d71 commit 8353aae
Showing 1 changed file with 1 addition and 16 deletions.
17 changes: 1 addition & 16 deletions tests/integration/kubernetes/gha-run.sh
Expand Up @@ -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
Expand Down Expand Up @@ -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
}
Expand Down

0 comments on commit 8353aae

Please sign in to comment.