Skip to content

ci: eks cluster pool eips cleanup step#43747

Merged
aanm merged 1 commit intomainfrom
pr/artyop/eks-cluster-pool-eips-cleanup
Jan 15, 2026
Merged

ci: eks cluster pool eips cleanup step#43747
aanm merged 1 commit intomainfrom
pr/artyop/eks-cluster-pool-eips-cleanup

Conversation

@Artyop
Copy link
Copy Markdown
Contributor

@Artyop Artyop commented Jan 14, 2026

This commit adds a cleanup step for unassociated EIPs generated by eks cluster pool workflow.

@maintainer-s-little-helper maintainer-s-little-helper bot added the dont-merge/needs-release-note-label The author needs to describe the release impact of these changes. label Jan 14, 2026
@Artyop Artyop added the release-note/ci This PR makes changes to the CI. label Jan 14, 2026
@maintainer-s-little-helper maintainer-s-little-helper bot removed the dont-merge/needs-release-note-label The author needs to describe the release impact of these changes. label Jan 14, 2026
@Artyop Artyop force-pushed the pr/artyop/eks-cluster-pool-eips-cleanup branch from 8d9d15b to 34c9f80 Compare January 14, 2026 11:26
@Artyop
Copy link
Copy Markdown
Contributor Author

Artyop commented Jan 14, 2026

/test

@Artyop
Copy link
Copy Markdown
Contributor Author

Artyop commented Jan 14, 2026

Diff of the test commit :

git diff HEAD~1
diff --git a/.github/workflows/eks-cluster-pool-manager.yaml b/.github/workflows/eks-cluster-pool-manager.yaml
index 6df5b0be56..b004fac0ac 100644
--- a/.github/workflows/eks-cluster-pool-manager.yaml
+++ b/.github/workflows/eks-cluster-pool-manager.yaml
@@ -11,6 +11,7 @@ on:
         required: false
         default: '2'
         type: string
+  pull_request:
 
 # By specifying the access of one of the scopes, all of those that are not
 # specified are set to 'none'.
@@ -28,7 +29,7 @@ jobs:
   generate-cleanup-matrix:
     name: Generate Cleanup Matrix
     runs-on: ubuntu-24.04
-    if: ${{ github.event_name == 'schedule' }}
+    if: ${{ github.event_name == 'schedule' || github.event_name == 'pull_request' }}
     outputs:
       matrix: ${{ steps.set-matrix.outputs.matrix }}
       empty: ${{ steps.set-matrix.outputs.empty }}
@@ -65,7 +66,7 @@ jobs:
     name: Cleanup clusters older than 6 hours
     runs-on: ubuntu-24.04
     needs: generate-cleanup-matrix
-    if: ${{ needs.generate-cleanup-matrix.outputs.empty == 'false' }}
+    if: ${{ github.event_name == 'schedule' && needs.generate-cleanup-matrix.outputs.empty == 'false' }}
     timeout-minutes: 45
     strategy:
       matrix: ${{ fromJson(needs.generate-cleanup-matrix.outputs.matrix) }}
@@ -190,7 +191,7 @@ jobs:
     name: Cleanup unassociated EIPs
     runs-on: ubuntu-24.04
     needs: [generate-cleanup-matrix, cleanup-old-clusters]
-    if: ${{ always() && needs.generate-cleanup-matrix.outputs.empty == 'false' }}
+    if: ${{ (github.event_name == 'pull_request' || always()) && needs.generate-cleanup-matrix.outputs.empty == 'false' }}
     timeout-minutes: 20
     strategy:
       matrix: ${{ fromJson(needs.generate-cleanup-matrix.outputs.matrix) }}
@@ -239,6 +240,7 @@ jobs:
   generate-create-matrix:
     name: Generate Create Matrix
     runs-on: ubuntu-24.04
+    if: ${{ github.event_name == 'schedule' }}
     outputs:
       matrix: ${{ steps.set-matrix.outputs.matrix }}
       empty: ${{ steps.set-matrix.outputs.empty }}
@@ -297,7 +299,7 @@ jobs:
     name: Ensure S3 bucket exists
     runs-on: ubuntu-24.04
     needs: generate-create-matrix
-    if: ${{ always() && needs.generate-create-matrix.outputs.empty == 'false' }}
+    if: ${{ github.event_name == 'schedule' && always() && needs.generate-create-matrix.outputs.empty == 'false' }}
     timeout-minutes: 10
     strategy:
       matrix: ${{ fromJson(needs.generate-create-matrix.outputs.matrix) }}
@@ -364,7 +366,7 @@ jobs:
     name: Create EKS clusters for pool
     runs-on: ubuntu-24.04
     needs: [cleanup-old-clusters, cleanup-unassociated-eips, generate-create-matrix, ensure-s3-bucket]
-    if: ${{ always() && needs.generate-create-matrix.outputs.empty == 'false' }}
+    if: ${{ github.event_name == 'schedule' && always() && needs.generate-create-matrix.outputs.empty == 'false' }}
     timeout-minutes: 30
     strategy:
       matrix: ${{ fromJson(needs.generate-create-matrix.outputs.matrix) }}
@@ -562,7 +564,7 @@ jobs:
     name: Report pool status
     runs-on: ubuntu-24.04
     needs: [generate-cleanup-matrix, cleanup-old-clusters, cleanup-unassociated-eips, create-clusters]
-    if: ${{ always() && needs.generate-cleanup-matrix.outputs.empty == 'false' }}
+    if: ${{ github.event_name == 'schedule' && always() && needs.generate-cleanup-matrix.outputs.empty == 'false' }}
     timeout-minutes: 10
     strategy:
       matrix: ${{ fromJson(needs.generate-cleanup-matrix.outputs.matrix) }}

Test run : https://github.com/cilium/cilium/actions/runs/20995741029

@Artyop Artyop force-pushed the pr/artyop/eks-cluster-pool-eips-cleanup branch from 37e164c to 34c9f80 Compare January 14, 2026 13:28
@Artyop Artyop marked this pull request as ready for review January 14, 2026 13:28
@Artyop Artyop requested review from a team as code owners January 14, 2026 13:28
@Artyop Artyop force-pushed the pr/artyop/eks-cluster-pool-eips-cleanup branch from 34c9f80 to 79f2131 Compare January 14, 2026 13:31
This commit adds a cleanup step for unassociated EIPs generated by
eks cluster pool workflow.

Signed-off-by: Antony Reynaud <antony.reynaud@isovalent.com>
@Artyop Artyop force-pushed the pr/artyop/eks-cluster-pool-eips-cleanup branch from 79f2131 to b65aff8 Compare January 14, 2026 13:46
@Artyop
Copy link
Copy Markdown
Contributor Author

Artyop commented Jan 14, 2026

/test

@aanm aanm self-requested a review January 14, 2026 14:49
@aanm aanm added this pull request to the merge queue Jan 15, 2026
Merged via the queue into main with commit f357a96 Jan 15, 2026
78 checks passed
@aanm aanm deleted the pr/artyop/eks-cluster-pool-eips-cleanup branch January 15, 2026 13:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

release-note/ci This PR makes changes to the CI.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants