mirror of
https://github.com/minio/minio.git
synced 2025-01-23 20:53:18 -05:00
fix: gcs tier going offline due to customer HTTPclient (#19973)
specifying customer HTTP client makes the gcs SDK ignore the passed credentials, instead let the GCS SDK manage the transport. this PR fixes #19922 a regression from #19565
This commit is contained in:
parent
4d7d008741
commit
be97ae4c5d
@ -22,7 +22,6 @@ import (
|
|||||||
"errors"
|
"errors"
|
||||||
"fmt"
|
"fmt"
|
||||||
"io"
|
"io"
|
||||||
"net/http"
|
|
||||||
|
|
||||||
"cloud.google.com/go/storage"
|
"cloud.google.com/go/storage"
|
||||||
"github.com/minio/madmin-go/v3"
|
"github.com/minio/madmin-go/v3"
|
||||||
@ -118,14 +117,9 @@ func newWarmBackendGCS(conf madmin.TierGCS, tier string) (*warmBackendGCS, error
|
|||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
|
|
||||||
clnt := &http.Client{
|
|
||||||
Transport: globalRemoteTargetTransport,
|
|
||||||
}
|
|
||||||
|
|
||||||
client, err := storage.NewClient(context.Background(),
|
client, err := storage.NewClient(context.Background(),
|
||||||
option.WithCredentialsJSON(credsJSON),
|
option.WithCredentialsJSON(credsJSON),
|
||||||
option.WithScopes(storage.ScopeReadWrite),
|
option.WithScopes(storage.ScopeReadWrite),
|
||||||
option.WithHTTPClient(clnt),
|
|
||||||
option.WithUserAgent(fmt.Sprintf("gcs-tier-%s", tier)+SlashSeparator+ReleaseTag),
|
option.WithUserAgent(fmt.Sprintf("gcs-tier-%s", tier)+SlashSeparator+ReleaseTag),
|
||||||
)
|
)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user