mirror of
https://github.com/k3s-io/k3s.git
synced 2024-06-07 19:41:36 +00:00
parent
3ee5098225
commit
aa5a0a8c78
@ -36,12 +36,18 @@ type s3 struct {
|
||||
// a new Minio client.
|
||||
func newS3(ctx context.Context, config *config.Control) (*s3, error) {
|
||||
tr := http.DefaultTransport
|
||||
if config.EtcdS3EndpointCA != "" {
|
||||
|
||||
switch {
|
||||
case config.EtcdS3EndpointCA != "":
|
||||
trCA, err := setTransportCA(tr, config.EtcdS3EndpointCA, config.EtcdS3SkipSSLVerify)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
tr = trCA
|
||||
case config.EtcdS3 && config.EtcdS3SkipSSLVerify:
|
||||
tr.(*http.Transport).TLSClientConfig = &tls.Config{
|
||||
InsecureSkipVerify: config.EtcdS3SkipSSLVerify,
|
||||
}
|
||||
}
|
||||
|
||||
var creds *credentials.Credentials
|
||||
|
Loading…
Reference in New Issue
Block a user