Merge pull request #1222 from fluxcd/backport-1211-to-release/v1.1.x

[release/v1.1.x] bucket: Use auto lookup type
This commit is contained in:
Stefan Prodan 2023-08-31 14:59:30 +03:00 committed by GitHub
commit 0720925a5a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 5 additions and 3 deletions

View File

@ -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 {