From 0519b53357b47450001e386cefd2127f17aa0150 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: c651e4f7da1c43ddd956fbba303e990d6f27130a --- transport/cache.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/transport/cache.go b/transport/cache.go index 9d2889d194..edcc6d1d48 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