From 212fb452f3722a2093972439fa27a64a25ba7530 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: 2fe98e9c00d6a084b482fa337acf5fe4f2fdedeb --- transport/cache.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/transport/cache.go b/transport/cache.go index b4f8dab0c..477c22cde 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