dynamic reload cluster authentication info for aggregated API servers

Kubernetes-commit: 3aede35b3b042e8a626e8fb9e1e181e73cd29d0a
This commit is contained in:
David Eads 2019-11-04 13:46:28 -05:00 committed by Kubernetes Publisher
parent 4bda71482c
commit 7a5b91a7ca

View File

@ -57,8 +57,8 @@ func GetClientCANamesForURL(kubeConfigURL string) ([]string, error) {
return GetClientCANames(apiserverURL.Host)
}
// GetServingCertificates returns the x509 certs used by a server. The serverName is optional for specifying a different
// name to get SNI certificates. apiHost is "host:port"
// GetServingCertificates returns the x509 certs used by a server as certificates and pem encoded bytes.
// The serverName is optional for specifying a different name to get SNI certificates. apiHost is "host:port"
func GetServingCertificates(apiHost, serverName string) ([]*x509.Certificate, [][]byte, error) {
tlsConfig := &tls.Config{
InsecureSkipVerify: true, // this is insecure so that we always get connected