mirror of
https://github.com/rocky-linux/peridot.git
synced 2024-12-21 02:08:29 +00:00
Enable dual stack for yumrepofs s3
This commit is contained in:
parent
320a10d11c
commit
71e4fd8618
@ -19,6 +19,7 @@ go_library(
|
|||||||
"//utils",
|
"//utils",
|
||||||
"//vendor/github.com/aws/aws-sdk-go/aws",
|
"//vendor/github.com/aws/aws-sdk-go/aws",
|
||||||
"//vendor/github.com/aws/aws-sdk-go/aws/credentials/stscreds",
|
"//vendor/github.com/aws/aws-sdk-go/aws/credentials/stscreds",
|
||||||
|
"//vendor/github.com/aws/aws-sdk-go/aws/endpoints",
|
||||||
"//vendor/github.com/aws/aws-sdk-go/aws/session",
|
"//vendor/github.com/aws/aws-sdk-go/aws/session",
|
||||||
"//vendor/github.com/aws/aws-sdk-go/service/s3",
|
"//vendor/github.com/aws/aws-sdk-go/service/s3",
|
||||||
"//vendor/github.com/go-git/go-billy/v5/osfs",
|
"//vendor/github.com/go-git/go-billy/v5/osfs",
|
||||||
|
@ -34,6 +34,7 @@ import (
|
|||||||
"context"
|
"context"
|
||||||
"github.com/aws/aws-sdk-go/aws"
|
"github.com/aws/aws-sdk-go/aws"
|
||||||
"github.com/aws/aws-sdk-go/aws/credentials/stscreds"
|
"github.com/aws/aws-sdk-go/aws/credentials/stscreds"
|
||||||
|
"github.com/aws/aws-sdk-go/aws/endpoints"
|
||||||
"github.com/aws/aws-sdk-go/aws/session"
|
"github.com/aws/aws-sdk-go/aws/session"
|
||||||
awss3 "github.com/aws/aws-sdk-go/service/s3"
|
awss3 "github.com/aws/aws-sdk-go/service/s3"
|
||||||
"github.com/go-git/go-billy/v5/osfs"
|
"github.com/go-git/go-billy/v5/osfs"
|
||||||
@ -66,7 +67,9 @@ func NewServer(db peridotdb.Access, session *session.Session) (*Server, error) {
|
|||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
|
|
||||||
cfg := &aws.Config{}
|
cfg := &aws.Config{
|
||||||
|
UseDualStackEndpoint: endpoints.DualStackEndpointStateEnabled,
|
||||||
|
}
|
||||||
if assumeRole := viper.GetString("s3-assume-role"); assumeRole != "" {
|
if assumeRole := viper.GetString("s3-assume-role"); assumeRole != "" {
|
||||||
cfg.Credentials = stscreds.NewCredentials(session, assumeRole)
|
cfg.Credentials = stscreds.NewCredentials(session, assumeRole)
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user