kubeadm: respect user provided kubeconfig during discovery process
This commit is contained in:
@@ -31,7 +31,7 @@ import (
|
||||
// RetrieveValidatedConfigInfo connects to the API Server and makes sure it can talk
|
||||
// securely to the API Server using the provided CA cert and
|
||||
// optionally refreshes the cluster-info information from the cluster-info ConfigMap
|
||||
func RetrieveValidatedConfigInfo(httpsURL, clustername string, discoveryTimeout time.Duration) (*clientcmdapi.Config, error) {
|
||||
func RetrieveValidatedConfigInfo(httpsURL string, discoveryTimeout time.Duration) (*clientcmdapi.Config, error) {
|
||||
client := &http.Client{Transport: netutil.SetOldTransportDefaults(&http.Transport{})}
|
||||
response, err := client.Get(httpsURL)
|
||||
if err != nil {
|
||||
@@ -48,5 +48,5 @@ func RetrieveValidatedConfigInfo(httpsURL, clustername string, discoveryTimeout
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return file.ValidateConfigInfo(config, clustername, discoveryTimeout)
|
||||
return file.ValidateConfigInfo(config, discoveryTimeout)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user