Merge pull request #115315 from enj/enj/i/kas_kubelet_conn_close

kubelet/client: collapse transport wiring onto standard approach

Kubernetes-commit: 22b88dea360b0aae4ecaa57142718386b3cbd40d
This commit is contained in:
Kubernetes Publisher 2023-02-07 07:01:14 -08:00
commit 00b9d76f44

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