diff --git a/CHANGELOG.md b/CHANGELOG.md index 93b09d4732..cf84c10488 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -17,6 +17,7 @@ We use *breaking :warning:* to mark changes that are not backward compatible (re - [#6605](https://github.com/thanos-io/thanos/pull/6605) Query Frontend: Support vertical sharding binary expression with metric name when no matching labels specified. - [#6308](https://github.com/thanos-io/thanos/pull/6308) Ruler: Support configuration flag that allows customizing template for alert message. - [#6749](https://github.com/thanos-io/thanos/pull/6308) Store Gateway: Added `thanos_store_index_cache_fetch_duration_seconds` histogram for tracking latency of fetching data from index cache. +- [#6751](https://github.com/thanos-io/thanos/pull/6751) Query Frontend: Added TLS support in `--query-frontend.downstream-tripper-config` and `--query-frontend.downstream-tripper-config-file` ### Changed diff --git a/cmd/thanos/query_frontend.go b/cmd/thanos/query_frontend.go index 82c06c4b56..9f35b070cf 100644 --- a/cmd/thanos/query_frontend.go +++ b/cmd/thanos/query_frontend.go @@ -25,6 +25,7 @@ import ( cortexvalidation "github.com/thanos-io/thanos/internal/cortex/util/validation" "github.com/thanos-io/thanos/pkg/api" "github.com/thanos-io/thanos/pkg/component" + "github.com/thanos-io/thanos/pkg/exthttp" "github.com/thanos-io/thanos/pkg/extkingpin" "github.com/thanos-io/thanos/pkg/extprom" extpromhttp "github.com/thanos-io/thanos/pkg/extprom/http" @@ -180,7 +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") } - + if tripperConfig.TLSConfig != nil { + tlsConfig, err := exthttp.NewTLSConfig(tripperConfig.TLSConfig) + if err != nil { + return nil, errors.Wrap(err, "parsing downstream tripper TLS config YAML") + } + downstreamTripper.TLSClientConfig = tlsConfig + } if tripperConfig.IdleConnTimeout > 0 { downstreamTripper.IdleConnTimeout = time.Duration(tripperConfig.IdleConnTimeout) } diff --git a/pkg/queryfrontend/config.go b/pkg/queryfrontend/config.go index a56551995c..60b38a190d 100644 --- a/pkg/queryfrontend/config.go +++ b/pkg/queryfrontend/config.go @@ -21,6 +21,7 @@ import ( "github.com/thanos-io/thanos/internal/cortex/util/flagext" cortexvalidation "github.com/thanos-io/thanos/internal/cortex/util/validation" "github.com/thanos-io/thanos/pkg/cacheutil" + "github.com/thanos-io/thanos/pkg/exthttp" "github.com/thanos-io/thanos/pkg/model" ) @@ -186,6 +187,7 @@ type DownstreamTripperConfig struct { MaxIdleConns *int `yaml:"max_idle_conns"` MaxIdleConnsPerHost *int `yaml:"max_idle_conns_per_host"` MaxConnsPerHost *int `yaml:"max_conns_per_host"` + TLSConfig *exthttp.TLSConfig `yaml:"tls_config"` CachePathOrContent extflag.PathOrContent }