Skip to content

Commit 0519b53

Browse files
enjk8s-publishing-bot
authored andcommitted
kubelet/client: collapse transport wiring onto standard approach
Signed-off-by: Monis Khan <[email protected]> Kubernetes-commit: c651e4f7da1c43ddd956fbba303e990d6f27130a
1 parent 9112e19 commit 0519b53

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

transport/cache.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,7 @@ func (c *tlsTransportCache) get(config *Config) (http.RoundTripper, error) {
109109

110110
// If we use are reloading files, we need to handle certificate rotation properly
111111
// TODO(jackkleeman): We can also add rotation here when config.HasCertCallback() is true
112-
if config.TLS.ReloadTLSFiles {
112+
if config.TLS.ReloadTLSFiles && tlsConfig != nil && tlsConfig.GetClientCertificate != nil {
113113
dynamicCertDialer := certRotatingDialer(tlsConfig.GetClientCertificate, dial)
114114
tlsConfig.GetClientCertificate = dynamicCertDialer.GetClientCertificate
115115
dial = dynamicCertDialer.connDialer.DialContext

0 commit comments

Comments
 (0)