From d8b14dc0899fc98a52904da8f8a96c718ed23c2d Mon Sep 17 00:00:00 2001 From: Monis Khan Date: Sun, 5 Feb 2023 20:51:54 -0500 Subject: [PATCH] kubelet/client: collapse transport wiring onto standard approach Signed-off-by: Monis Khan Kubernetes-commit: 754cb3d601a820180d19567c3600a789d77b0f07 --- transport/cache.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/transport/cache.go b/transport/cache.go index 9d2889d1..edcc6d1d 100644 --- a/transport/cache.go +++ b/transport/cache.go @@ -109,7 +109,7 @@ func (c *tlsTransportCache) get(config *Config) (http.RoundTripper, error) { // If we use are reloading files, we need to handle certificate rotation properly // TODO(jackkleeman): We can also add rotation here when config.HasCertCallback() is true - if config.TLS.ReloadTLSFiles { + if config.TLS.ReloadTLSFiles && tlsConfig != nil && tlsConfig.GetClientCertificate != nil { dynamicCertDialer := certRotatingDialer(tlsConfig.GetClientCertificate, dial) tlsConfig.GetClientCertificate = dynamicCertDialer.GetClientCertificate dial = dynamicCertDialer.connDialer.DialContext