From c1f1b71962f85a8d6b321536e3b21a380a578f1e Mon Sep 17 00:00:00 2001 From: Jonathan Innis Date: Fri, 8 Dec 2023 09:16:34 -0800 Subject: [PATCH] ci: Dump pod logs and describe pods based on karpenter pod labels (#5278) --- .github/actions/e2e/dump-logs/action.yaml | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) diff --git a/.github/actions/e2e/dump-logs/action.yaml b/.github/actions/e2e/dump-logs/action.yaml index f9a3a66286dc..5d120cac5677 100644 --- a/.github/actions/e2e/dump-logs/action.yaml +++ b/.github/actions/e2e/dump-logs/action.yaml @@ -22,20 +22,19 @@ runs: role-to-assume: arn:aws:iam::${{ inputs.account_id }}:role/${{ inputs.role }} aws-region: ${{ inputs.region }} role-duration-seconds: 21600 - - name: controller-logs + - name: update cluster context shell: bash run: | aws eks update-kubeconfig --name ${{ inputs.cluster_name }} - POD_NAME=$(kubectl get pods -n kube-system --no-headers -o custom-columns=":metadata.name" | tail -n 1) - echo "logs from pod ${POD_NAME}" - kubectl logs "${POD_NAME}" -n kube-system -c controller - - name: describe-karpenter-pods + - name: controller-logs shell: bash run: | - aws eks update-kubeconfig --name ${{ inputs.cluster_name }} - kubectl describe pods -n kube-system - - name: describe-nodes + kubectl logs -n kube-system -l app.kubernetes.io/name=karpenter --all-containers --ignore-errors + - name: describe karpenter pods + shell: bash + run: | + kubectl describe pods -n kube-system -l app.kubernetes.io/name=karpenter + - name: describe nodes shell: bash run: | - aws eks update-kubeconfig --name ${{ inputs.cluster_name }} kubectl describe nodes