Revert "Merge pull request #6309 from GoogleCloudPlatform/revert-6243-kubelet-ssl"
This reverts commit96a0a0d618
, reversing changes made to2af9b54147
.
This commit is contained in:
@@ -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
|
||||
}
|
||||
|
Reference in New Issue
Block a user