Skip to content

Commit

Permalink
fix: Eks pod identity support
Browse files Browse the repository at this point in the history
  • Loading branch information
AleCo3lho committed Apr 11, 2024
1 parent c06d4ce commit e9d94a4
Showing 1 changed file with 0 additions and 15 deletions.
15 changes: 0 additions & 15 deletions provider/aws/session.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,13 +18,10 @@ package aws

import (
"fmt"
"strings"

"github.com/aws/aws-sdk-go/aws"
"github.com/aws/aws-sdk-go/aws/credentials/stscreds"
"github.com/aws/aws-sdk-go/aws/request"
"github.com/aws/aws-sdk-go/aws/session"
"github.com/linki/instrumented_http"
"github.com/sirupsen/logrus"

"sigs.k8s.io/external-dns/pkg/apis/externaldns"
Expand All @@ -38,19 +35,7 @@ type AWSSessionConfig struct {
}

func NewSession(awsConfig AWSSessionConfig) (*session.Session, error) {
config := aws.NewConfig().WithMaxRetries(awsConfig.APIRetries)

config.WithHTTPClient(
instrumented_http.NewClient(config.HTTPClient, &instrumented_http.Callbacks{
PathProcessor: func(path string) string {
parts := strings.Split(path, "/")
return parts[len(parts)-1]
},
}),
)

session, err := session.NewSessionWithOptions(session.Options{
Config: *config,
SharedConfigState: session.SharedConfigEnable,
})
if err != nil {
Expand Down

0 comments on commit e9d94a4

Please sign in to comment.