Merge pull request #101390 from caesarxuchao/minor

minor change, move the comment to the right line
This commit is contained in:
Kubernetes Prow Robot 2021-05-07 10:47:16 -07:00 committed by GitHub
commit c76e21806b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -42,8 +42,6 @@ func (s *SecureServingInfo) NewClientConfig(caCert []byte) (*restclient.Config,
// Do not limit loopback client QPS.
QPS: -1,
Host: "https://" + net.JoinHostPort(host, port),
// override the ServerName to select our loopback certificate via SNI. This name is also
// used by the client to compare the returns server certificate against.
TLSClientConfig: restclient.TLSClientConfig{
CAData: caCert,
},
@ -57,6 +55,8 @@ func (s *SecureServingInfo) NewLoopbackClientConfig(token string, loopbackCert [
}
c.BearerToken = token
// override the ServerName to select our loopback certificate via SNI. This name is also
// used by the client to compare the returns server certificate against.
c.TLSClientConfig.ServerName = LoopbackClientServerNameOverride
return c, nil