update s3 endpoint handling
virtual host extracts bucket name from endpoint environment variable; path uses fixed bucket name
This commit is contained in:
committed by
=Michael Hohn
parent
bde8ac2db7
commit
5bdbd60cc5
@@ -8,7 +8,7 @@ import (
|
||||
|
||||
// Restrict the keys / values for ArtifactLocation and centralize the common ones
|
||||
// here
|
||||
const (
|
||||
var (
|
||||
AF_BUCKETNAME_RESULTS = "mrvabucket"
|
||||
AF_BUCKETNAME_PACKS = "mrvabucket"
|
||||
)
|
||||
|
||||
@@ -18,11 +18,11 @@ type MinIOArtifactStore struct {
|
||||
client *minio.Client
|
||||
}
|
||||
|
||||
func NewMinIOArtifactStore(endpoint, id, secret string) (*MinIOArtifactStore, error) {
|
||||
func NewMinIOArtifactStore(endpoint, id, secret string, lookup minio.BucketLookupType) (*MinIOArtifactStore, error) {
|
||||
minioClient, err := minio.New(endpoint, &minio.Options{
|
||||
Creds: credentials.NewStaticV4(id, secret, ""),
|
||||
Secure: false,
|
||||
BucketLookup: minio.BucketLookupDNS, // Enable virtual-host-style addressing
|
||||
BucketLookup: lookup,
|
||||
})
|
||||
if err != nil {
|
||||
return nil, err
|
||||
|
||||
Reference in New Issue
Block a user