Skip to content

Commit

Permalink
Update cmd/thanos/query_frontend.go
Browse files Browse the repository at this point in the history
Co-authored-by: Saswata Mukherjee <saswataminsta@yahoo.com>
Signed-off-by: space_samurai <92082372+Player256@users.noreply.github.com>
  • Loading branch information
Player256 and saswatamcode authored Sep 28, 2023
1 parent 60806dd commit 57ae9ca
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions cmd/thanos/query_frontend.go
Original file line number Diff line number Diff line change
Expand Up @@ -181,10 +181,13 @@ func parseTransportConfiguration(downstreamTripperConfContentYaml []byte) (*http
if err := yaml.UnmarshalStrict(downstreamTripperConfContentYaml, tripperConfig); err != nil {
return nil, errors.Wrap(err, "parsing downstream tripper config YAML file")
}
_, err := exthttp.NewTLSConfig(tripperConfig.TLSConfig)
if tripperConfig.TLSConfig != nil {
tlsConfig, err := exthttp.NewTLSConfig(tripperConfig.TLSConfig)
if err != nil {
downstreamTripper.TLSClientConfig, _ = exthttp.NewTLSConfig(tripperConfig.TLSConfig)
return nil, errors.Wrap(err, "parsing downstream tripper TLS config YAML")
}
downstreamTripper.TLSClientConfig = tlsConfig
}
if tripperConfig.IdleConnTimeout > 0 {
downstreamTripper.IdleConnTimeout = time.Duration(tripperConfig.IdleConnTimeout)
}
Expand Down

0 comments on commit 57ae9ca

Please sign in to comment.