Fix: painc when kubeconfig set filed insecure-skip-tls-verify
@@ -124,6 +124,7 @@ func CustomizeTLSTransport(fedCluster *fedv1b1.KubeFedCluster, clientConfig *res
return errors.Errorf("Cluster %s transport error: %s", fedCluster.Name, err)
}
+ if transportConfig != nil {
err = CustomizeCertificateValidation(fedCluster, transportConfig)
if err != nil {
return errors.Errorf("Cluster %s custom certificate validation error: %s", fedCluster.Name, err)
@@ -144,6 +145,10 @@ func CustomizeTLSTransport(fedCluster *fedv1b1.KubeFedCluster, clientConfig *res
TLSClientConfig: transportConfig,
}
clientConfig.TLSClientConfig = restclient.TLSClientConfig{}
+ } else {
+ clientConfig.Insecure = true
+ }
+
return nil
}
