File tree Expand file tree Collapse file tree 4 files changed +8
-2
lines changed Expand file tree Collapse file tree 4 files changed +8
-2
lines changed Original file line number Diff line number Diff line change @@ -74,6 +74,8 @@ config:
74
74
s3 :
75
75
# -- S3 bucket name
76
76
bucket : " "
77
+ # -- S3 option for bucket name in path instead of as subdomain
78
+ usePathStyle : false
77
79
# -- Datastore exposed port
78
80
addr : " :8080"
79
81
# -- Datastore hostname, used by controller, server and runner to reach the datastore
Original file line number Diff line number Diff line change @@ -12,6 +12,7 @@ config:
12
12
mock : <false|true> # default: false
13
13
s3 :
14
14
bucket : <bucket-name>
15
+ usePathStyle : <false|true> # default: false
15
16
gcs :
16
17
bucket : <bucket-name>
17
18
azure :
Original file line number Diff line number Diff line change @@ -40,7 +40,8 @@ type GCSConfig struct {
40
40
}
41
41
42
42
type S3Config struct {
43
- Bucket string `mapstructure:"bucket"`
43
+ Bucket string `mapstructure:"bucket"`
44
+ UsePathStyle bool `mapstructure:"usePathStyle"`
44
45
}
45
46
46
47
type AzureConfig struct {
Original file line number Diff line number Diff line change @@ -24,7 +24,9 @@ func New(config config.S3Config) *S3 {
24
24
if err != nil {
25
25
panic (err )
26
26
}
27
- client := storage .NewFromConfig (sdkConfig )
27
+ client := storage .NewFromConfig (sdkConfig , func (o * storage.Options ) {
28
+ o .UsePathStyle = config .UsePathStyle
29
+ })
28
30
return & S3 {
29
31
Config : config ,
30
32
Client : client ,
You can’t perform that action at this time.
0 commit comments