Skip to content

Commit da4eaf1

Browse files
committed
workflows: add eni-max-pods updater
Signed-off-by: Kush Upadhyay <[email protected]>
1 parent 9b8fe63 commit da4eaf1

File tree

1 file changed

+59
-0
lines changed

1 file changed

+59
-0
lines changed
Lines changed: 59 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
1+
name: "Update ENI max pods"
2+
on:
3+
workflow_dispatch:
4+
schedule:
5+
# Every Monday at 9AM PST
6+
- cron: "0 17 * * 1"
7+
permissions:
8+
id-token: write
9+
contents: write
10+
pull-requests: write
11+
jobs:
12+
update-eni-max-pods:
13+
if: github.repository == 'bottlerocket-os/bottlerocket-core-kit'
14+
runs-on: ubuntu-latest
15+
steps:
16+
- name: Configure credentials
17+
uses: aws-actions/configure-aws-credentials@7474bc4690e29a8392af63c5b98e7449536d5c3a # 4.3.1
18+
with:
19+
aws-region: ${{ secrets.ENI_MAX_PODS_UPDATER_REGION }}
20+
role-to-assume: ${{ secrets.ENI_MAX_PODS_UPDATER_ROLE_ARN }}
21+
role-duration-seconds: 900 # 15 minutes
22+
23+
- name: Checkout bottlerocket-core-kit
24+
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # 5.0.0
25+
with:
26+
repository: bottlerocket-os/bottlerocket-core-kit
27+
ref: refs/heads/develop
28+
path: bottlerocket-core-kit/
29+
30+
- name: Checkout amazon-vpc-cni-k8s
31+
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # 5.0.0
32+
with:
33+
repository: aws/amazon-vpc-cni-k8s
34+
ref: refs/heads/master
35+
path: amazon-vpc-cni-k8s/
36+
37+
- name: Run generation script and copy output
38+
run: |
39+
cd amazon-vpc-cni-k8s/
40+
make generate-limits
41+
cp misc/eni-max-pods.txt ../bottlerocket-core-kit/packages/os/eni-max-pods
42+
43+
- name: Create pull request
44+
uses: peter-evans/create-pull-request@271a8d0340265f705b14b6d32b9829c1cb33d45e # 7.0.8
45+
with:
46+
branch: update-eni-max-pods
47+
path: bottlerocket-core-kit/
48+
base: develop
49+
add-paths: |
50+
packages/os/eni-max-pods
51+
commit-message: "Update eni-max-pods"
52+
committer: "GitHub <[email protected]>"
53+
author: "GitHub <[email protected]>"
54+
title: "Update eni-max-pods"
55+
body: |
56+
Generated by [aws/amazon-vpc-cni-k8s](https://github.com/aws/amazon-vpc-cni-k8s):
57+
```
58+
make generate-limits
59+
```

0 commit comments

Comments
 (0)