diff --git a/.github/workflows/update-eni-max-pods.yaml b/.github/workflows/update-eni-max-pods.yaml new file mode 100644 index 000000000..1a975452b --- /dev/null +++ b/.github/workflows/update-eni-max-pods.yaml @@ -0,0 +1,59 @@ +name: "Update ENI max pods" +on: + workflow_dispatch: + schedule: + # Every Monday at 9AM PST + - cron: "0 17 * * 1" +permissions: + id-token: write + contents: write + pull-requests: write +jobs: + update-eni-max-pods: + if: github.repository == 'bottlerocket-os/bottlerocket-core-kit' + runs-on: ubuntu-latest + steps: + - name: Configure credentials + uses: aws-actions/configure-aws-credentials@7474bc4690e29a8392af63c5b98e7449536d5c3a # 4.3.1 + with: + aws-region: ${{ secrets.ENI_MAX_PODS_UPDATER_REGION }} + role-to-assume: ${{ secrets.ENI_MAX_PODS_UPDATER_ROLE_ARN }} + role-duration-seconds: 900 # 15 minutes + + - name: Checkout bottlerocket-core-kit + uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # 5.0.0 + with: + repository: bottlerocket-os/bottlerocket-core-kit + ref: refs/heads/develop + path: bottlerocket-core-kit/ + + - name: Checkout amazon-vpc-cni-k8s + uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # 5.0.0 + with: + repository: aws/amazon-vpc-cni-k8s + ref: refs/heads/master + path: amazon-vpc-cni-k8s/ + + - name: Run generation script and copy output + run: | + cd amazon-vpc-cni-k8s/ + make generate-limits + cp misc/eni-max-pods.txt ../bottlerocket-core-kit/packages/os/eni-max-pods + + - name: Create pull request + uses: peter-evans/create-pull-request@271a8d0340265f705b14b6d32b9829c1cb33d45e # 7.0.8 + with: + branch: update-eni-max-pods + path: bottlerocket-core-kit/ + base: develop + add-paths: | + packages/os/eni-max-pods + commit-message: "Update eni-max-pods" + committer: "GitHub " + author: "GitHub " + title: "Update eni-max-pods" + body: | + Generated by [aws/amazon-vpc-cni-k8s](https://github.com/aws/amazon-vpc-cni-k8s): + ``` + make generate-limits + ```