diff --git a/vendor.conf b/vendor.conf index a9cef730824a..79f6f2a18892 100644 --- a/vendor.conf +++ b/vendor.conf @@ -76,12 +76,12 @@ golang.org/x/oauth2 858c2ad4c8b6c5d10852cb89079f golang.org/x/time 555d28b269f0569763d25dbe1a237ae74c6bcc82 gopkg.in/inf.v0 v0.9.1 gopkg.in/yaml.v2 v2.2.8 -k8s.io/api v0.19.2 -k8s.io/apimachinery v0.19.2 -k8s.io/apiserver v0.19.2 -k8s.io/client-go v0.19.2 -k8s.io/component-base v0.19.2 -k8s.io/cri-api v0.19.2 +k8s.io/api v0.19.4 +k8s.io/apimachinery v0.19.4 +k8s.io/apiserver v0.19.4 +k8s.io/client-go v0.19.4 +k8s.io/component-base v0.19.4 +k8s.io/cri-api v0.19.4 k8s.io/klog/v2 v2.2.0 k8s.io/utils d5654de09c73da55eb19ae4ab4f734f7a61747a6 sigs.k8s.io/structured-merge-diff/v4 v4.0.1 diff --git a/vendor/k8s.io/api/go.mod b/vendor/k8s.io/api/go.mod index 2696f2e6e876..fe853d23d6f1 100644 --- a/vendor/k8s.io/api/go.mod +++ b/vendor/k8s.io/api/go.mod @@ -7,7 +7,7 @@ go 1.15 require ( github.com/gogo/protobuf v1.3.1 github.com/stretchr/testify v1.4.0 - k8s.io/apimachinery v0.19.2 + k8s.io/apimachinery v0.19.4 ) -replace k8s.io/apimachinery => k8s.io/apimachinery v0.19.2 +replace k8s.io/apimachinery => k8s.io/apimachinery v0.19.4 diff --git a/vendor/k8s.io/apiserver/go.mod b/vendor/k8s.io/apiserver/go.mod index 2161e4e2212d..002d99936618 100644 --- a/vendor/k8s.io/apiserver/go.mod +++ b/vendor/k8s.io/apiserver/go.mod @@ -41,10 +41,10 @@ require ( gopkg.in/natefinch/lumberjack.v2 v2.0.0 gopkg.in/square/go-jose.v2 v2.2.2 gopkg.in/yaml.v2 v2.2.8 - k8s.io/api v0.19.2 - k8s.io/apimachinery v0.19.2 - k8s.io/client-go v0.19.2 - k8s.io/component-base v0.19.2 + k8s.io/api v0.19.4 + k8s.io/apimachinery v0.19.4 + k8s.io/client-go v0.19.4 + k8s.io/component-base v0.19.4 k8s.io/klog/v2 v2.2.0 k8s.io/kube-openapi v0.0.0-20200805222855-6aeccd4b50c6 k8s.io/utils v0.0.0-20200729134348-d5654de09c73 @@ -54,8 +54,8 @@ require ( ) replace ( - k8s.io/api => k8s.io/api v0.19.2 - k8s.io/apimachinery => k8s.io/apimachinery v0.19.2 - k8s.io/client-go => k8s.io/client-go v0.19.2 - k8s.io/component-base => k8s.io/component-base v0.19.2 + k8s.io/api => k8s.io/api v0.19.4 + k8s.io/apimachinery => k8s.io/apimachinery v0.19.4 + k8s.io/client-go => k8s.io/client-go v0.19.4 + k8s.io/component-base => k8s.io/component-base v0.19.4 ) diff --git a/vendor/k8s.io/client-go/go.mod b/vendor/k8s.io/client-go/go.mod index f8614cd5a0d2..ec152c17582e 100644 --- a/vendor/k8s.io/client-go/go.mod +++ b/vendor/k8s.io/client-go/go.mod @@ -26,14 +26,14 @@ require ( golang.org/x/net v0.0.0-20200707034311-ab3426394381 golang.org/x/oauth2 v0.0.0-20191202225959-858c2ad4c8b6 golang.org/x/time v0.0.0-20191024005414-555d28b269f0 - k8s.io/api v0.19.2 - k8s.io/apimachinery v0.19.2 + k8s.io/api v0.19.4 + k8s.io/apimachinery v0.19.4 k8s.io/klog/v2 v2.2.0 k8s.io/utils v0.0.0-20200729134348-d5654de09c73 sigs.k8s.io/yaml v1.2.0 ) replace ( - k8s.io/api => k8s.io/api v0.19.2 - k8s.io/apimachinery => k8s.io/apimachinery v0.19.2 + k8s.io/api => k8s.io/api v0.19.4 + k8s.io/apimachinery => k8s.io/apimachinery v0.19.4 ) diff --git a/vendor/k8s.io/client-go/transport/cache.go b/vendor/k8s.io/client-go/transport/cache.go index 3ec4e19357de..fa2afb1f161e 100644 --- a/vendor/k8s.io/client-go/transport/cache.go +++ b/vendor/k8s.io/client-go/transport/cache.go @@ -47,12 +47,9 @@ type tlsCacheKey struct { keyData string certFile string keyFile string - getCert string serverName string nextProtos string - dial string disableCompression bool - proxy string } func (t tlsCacheKey) String() string { @@ -60,22 +57,24 @@ func (t tlsCacheKey) String() string { if len(t.keyData) > 0 { keyText = "" } - return fmt.Sprintf("insecure:%v, caData:%#v, certData:%#v, keyData:%s, getCert: %s, serverName:%s, dial:%s disableCompression:%t, proxy: %s", t.insecure, t.caData, t.certData, keyText, t.getCert, t.serverName, t.dial, t.disableCompression, t.proxy) + return fmt.Sprintf("insecure:%v, caData:%#v, certData:%#v, keyData:%s, serverName:%s, disableCompression:%t", t.insecure, t.caData, t.certData, keyText, t.serverName, t.disableCompression) } func (c *tlsTransportCache) get(config *Config) (http.RoundTripper, error) { - key, err := tlsConfigKey(config) + key, canCache, err := tlsConfigKey(config) if err != nil { return nil, err } - // Ensure we only create a single transport for the given TLS options - c.mu.Lock() - defer c.mu.Unlock() + if canCache { + // Ensure we only create a single transport for the given TLS options + c.mu.Lock() + defer c.mu.Unlock() - // See if we already have a custom transport for this config - if t, ok := c.transports[key]; ok { - return t, nil + // See if we already have a custom transport for this config + if t, ok := c.transports[key]; ok { + return t, nil + } } // Get the TLS options for this client config @@ -110,8 +109,7 @@ func (c *tlsTransportCache) get(config *Config) (http.RoundTripper, error) { proxy = config.Proxy } - // Cache a single transport for these options - c.transports[key] = utilnet.SetTransportDefaults(&http.Transport{ + transport := utilnet.SetTransportDefaults(&http.Transport{ Proxy: proxy, TLSHandshakeTimeout: 10 * time.Second, TLSClientConfig: tlsConfig, @@ -119,24 +117,33 @@ func (c *tlsTransportCache) get(config *Config) (http.RoundTripper, error) { DialContext: dial, DisableCompression: config.DisableCompression, }) - return c.transports[key], nil + + if canCache { + // Cache a single transport for these options + c.transports[key] = transport + } + + return transport, nil } // tlsConfigKey returns a unique key for tls.Config objects returned from TLSConfigFor -func tlsConfigKey(c *Config) (tlsCacheKey, error) { +func tlsConfigKey(c *Config) (tlsCacheKey, bool, error) { // Make sure ca/key/cert content is loaded if err := loadTLSFiles(c); err != nil { - return tlsCacheKey{}, err + return tlsCacheKey{}, false, err } + + if c.TLS.GetCert != nil || c.Dial != nil || c.Proxy != nil { + // cannot determine equality for functions + return tlsCacheKey{}, false, nil + } + k := tlsCacheKey{ insecure: c.TLS.Insecure, caData: string(c.TLS.CAData), - getCert: fmt.Sprintf("%p", c.TLS.GetCert), serverName: c.TLS.ServerName, nextProtos: strings.Join(c.TLS.NextProtos, ","), - dial: fmt.Sprintf("%p", c.Dial), disableCompression: c.DisableCompression, - proxy: fmt.Sprintf("%p", c.Proxy), } if c.TLS.ReloadTLSFiles { @@ -147,5 +154,5 @@ func tlsConfigKey(c *Config) (tlsCacheKey, error) { k.keyData = string(c.TLS.KeyData) } - return k, nil + return k, true, nil } diff --git a/vendor/k8s.io/component-base/go.mod b/vendor/k8s.io/component-base/go.mod index 81833c4800a0..b14610cf995b 100644 --- a/vendor/k8s.io/component-base/go.mod +++ b/vendor/k8s.io/component-base/go.mod @@ -20,14 +20,14 @@ require ( go.uber.org/atomic v1.4.0 // indirect go.uber.org/multierr v1.1.0 // indirect go.uber.org/zap v1.10.0 - k8s.io/apimachinery v0.19.2 - k8s.io/client-go v0.19.2 + k8s.io/apimachinery v0.19.4 + k8s.io/client-go v0.19.4 k8s.io/klog/v2 v2.2.0 k8s.io/utils v0.0.0-20200729134348-d5654de09c73 ) replace ( - k8s.io/api => k8s.io/api v0.19.2 - k8s.io/apimachinery => k8s.io/apimachinery v0.19.2 - k8s.io/client-go => k8s.io/client-go v0.19.2 + k8s.io/api => k8s.io/api v0.19.4 + k8s.io/apimachinery => k8s.io/apimachinery v0.19.4 + k8s.io/client-go => k8s.io/client-go v0.19.4 )