Revert "Merge pull request #6309 from GoogleCloudPlatform/revert-6243-kubelet-ssl"

This reverts commit 96a0a0d618, reversing
changes made to 2af9b54147.
This commit is contained in:
Robert Bailey
2015-04-01 16:19:17 -07:00
parent acdce749a3
commit f15e34a1bf
9 changed files with 126 additions and 71 deletions

View File

@@ -75,9 +75,14 @@ type HTTPKubeletClient struct {
func NewKubeletClient(config *KubeletConfig) (KubeletClient, error) {
transport := http.DefaultTransport
tlsConfig, err := TLSConfigFor(&Config{
TLSClientConfig: config.TLSClientConfig,
})
cfg := &Config{TLSClientConfig: config.TLSClientConfig}
if config.EnableHttps {
hasCA := len(config.CAFile) > 0 || len(config.CAData) > 0
if !hasCA {
cfg.Insecure = true
}
}
tlsConfig, err := TLSConfigFor(cfg)
if err != nil {
return nil, err
}