Skip to content
Closed
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion cache/s3proxy/s3proxy.go
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ func New(
// S3CloudStorageConfig struct fields:
Endpoint string,
Bucket string,
BucketLookupType minio.BucketLookupType,
Prefix string,
Credentials *credentials.Credentials,
DisableSSL bool,
Expand All @@ -69,7 +70,8 @@ func New(

// Initialize minio client with credentials
opts := &minio.Options{
Creds: Credentials,
Creds: Credentials,
BucketLookup: BucketLookupType,

Region: Region,
Secure: !DisableSSL,
Expand Down
1 change: 1 addition & 0 deletions config/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ go_library(
"//cache/s3proxy:go_default_library",
"@com_github_azure_azure_sdk_for_go_sdk_azcore//:go_default_library",
"@com_github_azure_azure_sdk_for_go_sdk_azidentity//:go_default_library",
"@com_github_minio_minio_go_v7//:go_default_library",
"@com_github_minio_minio_go_v7//pkg/credentials:go_default_library",
"@com_github_urfave_cli_v2//:go_default_library",
"@in_gopkg_yaml_v3//:go_default_library",
Expand Down
1 change: 1 addition & 0 deletions config/proxy.go
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ func (c *Config) setProxy() error {
c.ProxyBackend = s3proxy.New(
c.S3CloudStorage.Endpoint,
c.S3CloudStorage.Bucket,
c.S3CloudStorage.BucketLookupType,
c.S3CloudStorage.Prefix,
creds,
c.S3CloudStorage.DisableSSL,
Expand Down
3 changes: 3 additions & 0 deletions config/s3.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import (

"github.com/buchgr/bazel-remote/v2/cache/s3proxy"

"github.com/minio/minio-go/v7"
"github.com/minio/minio-go/v7/pkg/credentials"
)

Expand All @@ -24,6 +25,8 @@ type S3CloudStorageConfig struct {
KeyVersion *int `yaml:"key_version"`
AWSProfile string `yaml:"aws_profile"`
AWSSharedCredentialsFile string `yaml:"aws_shared_credentials_file"`

BucketLookupType minio.BucketLookupType `yaml:"bucket_lookup_type"`
}

func (s3c S3CloudStorageConfig) GetCredentials() (*credentials.Credentials, error) {
Expand Down