From 57ae9caa3e933129714e4ca294658f75bb267c5e Mon Sep 17 00:00:00 2001 From: space_samurai <92082372+Player256@users.noreply.github.com> Date: Thu, 28 Sep 2023 10:38:55 +0530 Subject: [PATCH] Update cmd/thanos/query_frontend.go Co-authored-by: Saswata Mukherjee Signed-off-by: space_samurai <92082372+Player256@users.noreply.github.com> --- cmd/thanos/query_frontend.go | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/cmd/thanos/query_frontend.go b/cmd/thanos/query_frontend.go index 023d9526714..9f35b070cf0 100644 --- a/cmd/thanos/query_frontend.go +++ b/cmd/thanos/query_frontend.go @@ -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) }