Skip to content

Commit 3bebfd5

Browse files
authored
fix(0.34.x): discover deprecated EKS optimized AMIs (#7244)
1 parent 4413d6a commit 3bebfd5

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

pkg/providers/amifamily/ami.go

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -153,8 +153,9 @@ func (p *Provider) getDefaultAMIs(ctx context.Context, nodeClass *v1beta1.EC2Nod
153153
}
154154
// Resolve Name and CreationDate information into the DefaultAMIs
155155
if err = p.ec2api.DescribeImagesPagesWithContext(ctx, &ec2.DescribeImagesInput{
156-
Filters: []*ec2.Filter{{Name: aws.String("image-id"), Values: aws.StringSlice(lo.Map(res, func(a AMI, _ int) string { return a.AmiID }))}},
157-
MaxResults: aws.Int64(500),
156+
Filters: []*ec2.Filter{{Name: aws.String("image-id"), Values: aws.StringSlice(lo.Map(res, func(a AMI, _ int) string { return a.AmiID }))}},
157+
MaxResults: aws.Int64(500),
158+
IncludeDeprecated: lo.ToPtr(true),
158159
}, func(page *ec2.DescribeImagesOutput, _ bool) bool {
159160
for i := range page.Images {
160161
for j := range res {

0 commit comments

Comments
 (0)