Skip to content

Commit 2905980

Browse files
authored
Enable auto-update of ec2 info (#8239)
Signed-off-by: Davanum Srinivas <[email protected]>
1 parent ec903e3 commit 2905980

File tree

4 files changed

+15
-3
lines changed

4 files changed

+15
-3
lines changed

.github/workflows/update-generated.yaml

+9-1
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ jobs:
1515
strategy:
1616
fail-fast: false
1717
matrix:
18-
resource: ["coredns", "aws-node", "nvidia-device-plugin"]
18+
resource: ["coredns", "aws-node", "nvidia-device-plugin", "ec2-info"]
1919
name: Update ${{ matrix.resource }} and open PR
2020
runs-on: ubuntu-latest
2121
container: public.ecr.aws/eksctl/eksctl-build:26e3c36557da8ae2db5d995cea673e05cc60cfce
@@ -35,6 +35,14 @@ jobs:
3535
role-duration-seconds: 900
3636
role-session-name: eksctl-update-coredns-assets
3737
role-to-assume: ${{ secrets.UPDATE_COREDNS_ROLE_ARN }}
38+
- name: Configure AWS credentials for ec2 info update
39+
if: ${{ matrix.resource == 'ec2-info' }}
40+
uses: aws-actions/configure-aws-credentials@ececac1a45f3b08a01d2dd070d28d111c5fe6722 # v4.1.0
41+
with:
42+
aws-region: us-west-2
43+
role-duration-seconds: 900
44+
role-session-name: eksctl-update-ec2-info-assets
45+
role-to-assume: ${{ secrets.UPDATE_EC2_INFO_ROLE_ARN }}
3846
- name: Setup identity as eksctl-bot
3947
uses: ./.github/actions/setup-identity
4048
with:

Makefile

+4
Original file line numberDiff line numberDiff line change
@@ -172,6 +172,10 @@ update-aws-node: ## Re-download the aws-node manifests from AWS
172172
update-coredns: ## get latest coredns builds for each available eks version
173173
@go run pkg/addons/default/scripts/update_coredns_assets.go
174174

175+
.PHONY:
176+
update-ec2-info: ## get latest info on ec2 instance types
177+
@go run cmd/ec2geninfo/main.go
178+
175179
deep_copy_helper_input = $(shell $(call godeps_cmd,./pkg/apis/...) | sed 's|$(generated_code_deep_copy_helper)||' )
176180
$(generated_code_deep_copy_helper): $(deep_copy_helper_input) ## Generate Kubernetes API helpers
177181
build/scripts/update-codegen.sh

cmd/ec2geninfo/main.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ func updateEC2Instances() error {
9191
return err
9292
}
9393

94-
file, err := os.Create("../../pkg/utils/instance/instance_types.go")
94+
file, err := os.Create("pkg/utils/instance/instance_types.go")
9595
if err != nil {
9696
return err
9797
}

pkg/utils/instance/instance_types.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -5242,7 +5242,7 @@ var InstanceTypes = []InstanceInfo{
52425242
InstanceStorageSupported: true,
52435243
EFASupported: true,
52445244
NvidiaGPUSupported: true,
5245-
NvidiaGPUType: "NVIDIA",
5245+
NvidiaGPUType: "H200",
52465246
NeuronSupported: false,
52475247
NeuronDeviceType: "",
52485248
CBRSupported: true,

0 commit comments

Comments
 (0)