Chore: use auto bucket lookup type
Signed-off-by: Zhiyu Wang <zhiyuwang.newbis@gmail.com>
(cherry picked from commit 1ab089e19e)
			
			
This commit is contained in:
		
							parent
							
								
									5d68b5d417
								
							
						
					
					
						commit
						ef9dbd17b8
					
				| 
						 | 
				
			
			@ -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 {
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
		Reference in New Issue