Skip to content

Commit

Permalink
increase nodeadm IMDS retries (#1699)
Browse files Browse the repository at this point in the history
  • Loading branch information
ndbaker1 committed Mar 4, 2024
1 parent a5a5ead commit 8190adb
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion nodeadm/internal/configprovider/userdata.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,9 @@ import (
"mime/multipart"
"net/mail"
"strings"
"time"

"github.com/aws/aws-sdk-go-v2/aws/retry"
"github.com/aws/aws-sdk-go-v2/feature/ec2/imds"
"github.com/awslabs/amazon-eks-ami/nodeadm/api"
internalapi "github.com/awslabs/amazon-eks-ami/nodeadm/internal/api"
Expand All @@ -29,7 +31,12 @@ type userDataConfigProvider struct {

func NewUserDataConfigProvider() ConfigProvider {
return &userDataConfigProvider{
imdsClient: imds.New(imds.Options{}),
imdsClient: imds.New(imds.Options{
Retryer: retry.NewStandard(func(so *retry.StandardOptions) {
so.MaxAttempts = 15
so.MaxBackoff = 1 * time.Second
}),
}),
}
}

Expand Down

0 comments on commit 8190adb

Please sign in to comment.