mirror of
https://github.com/kubernetes-sigs/prometheus-adapter.git
synced 2026-04-07 22:25:03 +00:00
Fixed not needed error handling
This commit is contained in:
parent
0e05facc05
commit
918899e434
1 changed files with 1 additions and 5 deletions
|
|
@ -78,10 +78,7 @@ func (cmd *PrometheusAdapter) makePromClient() (prom.Client, error) {
|
||||||
var httpClient *http.Client
|
var httpClient *http.Client
|
||||||
|
|
||||||
if cmd.SkipTLSVerification {
|
if cmd.SkipTLSVerification {
|
||||||
prometheusInsecureClient, err := makePrometheusInsecureClient()
|
prometheusInsecureClient := makePrometheusInsecureClient()
|
||||||
if err != nil {
|
|
||||||
return nil, err
|
|
||||||
}
|
|
||||||
httpClient = prometheusInsecureClient
|
httpClient = prometheusInsecureClient
|
||||||
glog.Info("successfully skipped tls verification")
|
glog.Info("successfully skipped tls verification")
|
||||||
} else if cmd.PrometheusCAFile != "" {
|
} else if cmd.PrometheusCAFile != "" {
|
||||||
|
|
@ -328,7 +325,6 @@ func makePrometheusInsecureClient() (*http.Client) {
|
||||||
return &http.Client{
|
return &http.Client{
|
||||||
Transport: &http.Transport{
|
Transport: &http.Transport{
|
||||||
TLSClientConfig: &tls.Config{
|
TLSClientConfig: &tls.Config{
|
||||||
RootCAs: pool,
|
|
||||||
SkipTLSVerification: true
|
SkipTLSVerification: true
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue