Skip to content

Commit

Permalink
Chore: use auto bucket lookup type
Browse files Browse the repository at this point in the history
Signed-off-by: Zhiyu Wang <[email protected]>
  • Loading branch information
zhiyu0729 committed Aug 31, 2023
1 parent 0124126 commit d174bff
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions pkg/minio/minio.go
Original file line number Diff line number Diff line change
Expand Up @@ -38,9 +38,11 @@ type MinioClient struct {
// NewClient creates a new Minio storage client.
func NewClient(bucket *sourcev1.Bucket, secret *corev1.Secret) (*MinioClient, error) {
opt := minio.Options{
Region: bucket.Spec.Region,
Secure: !bucket.Spec.Insecure,
BucketLookup: minio.BucketLookupPath,
Region: bucket.Spec.Region,
Secure: !bucket.Spec.Insecure,
// About BucketLookup, it should be noted that not all S3 providers support
// path-type access (e.g., Ali OSS). Hence, we revert to using the default
// auto access, which we believe can cover most use cases.
}

if secret != nil {
Expand Down

0 comments on commit d174bff

Please sign in to comment.