From 1ab089e19e3bf90ae9bab77b68fb1deb5259a710 Mon Sep 17 00:00:00 2001 From: Zhiyu Wang Date: Thu, 31 Aug 2023 09:34:54 +0000 Subject: [PATCH] Chore: use auto bucket lookup type Signed-off-by: Zhiyu Wang --- pkg/minio/minio.go | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/pkg/minio/minio.go b/pkg/minio/minio.go index f1930dbd..deaa2f98 100644 --- a/pkg/minio/minio.go +++ b/pkg/minio/minio.go @@ -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 {