kubelet/client: collapse transport wiring onto standard approach

Signed-off-by: Monis Khan <mok@microsoft.com>

Kubernetes-commit: 754cb3d601a820180d19567c3600a789d77b0f07
This commit is contained in:
Monis Khan 2023-02-05 20:51:54 -05:00 committed by Kubernetes Publisher
parent 9c5046523c
commit d8b14dc089

View File

@ -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