Skip to content

Commit e6bc0bc

Browse files
Merge pull request #115566 from enj/automated-cherry-pick-of-#115315-upstream-release-1.26
Automated cherry pick of #115315: kubelet/client: collapse transport wiring onto standard Kubernetes-commit: 1802182ca3f88c0d0db79e46757e9158c9b187dc
2 parents 9112e19 + 0519b53 commit e6bc0bc

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)