Skip to content

Commit

Permalink
tempo-query: separate tls settings for server and client (#4177)
Browse files Browse the repository at this point in the history
* tempo-query: separate tls settings for server and client

Signed-off-by: Benedikt Bongartz <bongartz@klimlive.de>

* tempo-query: add changelog and comments to config

Signed-off-by: Benedikt Bongartz <bongartz@klimlive.de>

---------

Signed-off-by: Benedikt Bongartz <bongartz@klimlive.de>
  • Loading branch information
frzifus authored Oct 14, 2024
1 parent 7f40dad commit a2f70c9
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 4 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
## main / unreleased

* [ENHANCEMENT] tempo-query: separate tls settings for server and client [#4177](https://github.com/grafana/tempo/pull/4177) (@frzifus)
* [ENHANCEMENT] Pushdown collection of results from generators in the querier [#4119](https://github.com/grafana/tempo/pull/4119) (@electron0zero)
* [ENHANCEMENT] Send semver version in api/stattus/buildinfo for cloud deployments [#4110](https://github.com/grafana/tempo/pull/4110) [@Aki0x137]
* [ENHANCEMENT] Speedup tempo-query trace search by allowing parallel queries [#4159](https://github.com/grafana/tempo/pull/4159) (@pavolloffay)
Expand Down
2 changes: 1 addition & 1 deletion cmd/tempo-query/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ func main() {
google_grpc.StreamInterceptor(otgrpc.OpenTracingStreamServerInterceptor(opentracing.GlobalTracer())),
}

if cfg.TLSEnabled {
if cfg.TLSServerEnabeld {
creds, err := credentials.NewClientTLSFromFile(cfg.TLS.CertPath, cfg.TLS.ServerName)
if err != nil {
logger.Error("failed to load TLS credentials", zap.Error(err))
Expand Down
10 changes: 7 additions & 3 deletions cmd/tempo-query/tempo/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,12 @@ import (

// Config holds the configuration for redbull.
type Config struct {
Address string `yaml:"address"`
Backend string `yaml:"backend"`
TLSEnabled bool `yaml:"tls_enabled" category:"advanced"`
Address string `yaml:"address"`
Backend string `yaml:"backend"`
// TLSEnabled enables tls outgoing requests from tempo-query to tempo.
TLSEnabled bool `yaml:"tls_enabled" category:"advanced"`
// TLSServerEnabeld enables tls for incoming requests to the tempo-query API.
TLSServerEnabeld bool `yaml:"tls_server_enabled" category:"advanced"`
TLS tls.ClientConfig `yaml:",inline"`
TenantHeaderKey string `yaml:"tenant_header_key"`
QueryServicesDuration string `yaml:"services_query_duration"`
Expand All @@ -27,6 +30,7 @@ func (c *Config) InitFromViper(v *viper.Viper) {
c.Address = address
c.Backend = v.GetString("backend")
c.TLSEnabled = v.GetBool("tls_enabled")
c.TLSServerEnabeld = v.GetBool("tls_server_enabled")
c.TLS.CertPath = v.GetString("tls_cert_path")
c.TLS.KeyPath = v.GetString("tls_key_path")
c.TLS.CAPath = v.GetString("tls_ca_path")
Expand Down

0 comments on commit a2f70c9

Please sign in to comment.