Skip to content

Commit

Permalink
Revert "ci: don't remove cluster with unhealthy mng (aws#5746)"
Browse files Browse the repository at this point in the history
This reverts commit 4b1d4e6.
  • Loading branch information
jmdeal committed Mar 18, 2024
1 parent 943ea63 commit 5254e8e
Showing 1 changed file with 1 addition and 13 deletions.
14 changes: 1 addition & 13 deletions .github/workflows/e2e.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -172,21 +172,9 @@ jobs:
role: ${{ vars.CI_ROLE_NAME }}
region: ${{ inputs.region }}
cluster_name: ${{ steps.generate-cluster-name.outputs.CLUSTER_NAME }}
# In the case of failure, check if the managed node group is unhealthy. If so, do not clean up cluster for further investigation.
# TODO: @jmdeal remove after investigation is complete
- name: detect unhealthy mng
id: detect-unhealthy-mng
shell: bash
if: failure() || cancelled()
run: |
if ! kubectl get nodes -l eks.amazonaws.com/nodegroup -oyaml | yq ".items[].status.conditions" | grep -q "KubeletNotReady"; then
echo UNHEALTHY="false" >> "$GITHUB_OUTPUT"
else
echo UNHEALTHY="true" >> "$GITHUB_OUTPUT"
fi
- name: cleanup karpenter and cluster '${{ steps.generate-cluster-name.outputs.CLUSTER_NAME }}' resources
uses: ./.github/actions/e2e/cleanup
if: always() && inputs.cleanup && (steps.detect-unhealthy-mng.conclusion == 'skipped' || steps.detect-unhealthy-mng.outputs.UNHEALTHY == 'false')
if: always() && inputs.cleanup
with:
account_id: ${{ vars.CI_ACCOUNT_ID }}
role: ${{ vars.CI_ROLE_NAME }}
Expand Down

0 comments on commit 5254e8e

Please sign in to comment.