Skip to content

Commit 4ea945b

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

File tree

1 file changed

+60
-0
lines changed

1 file changed

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

0 commit comments

Comments
 (0)