Skip to content

Commit

Permalink
tempo-query: separate tls settings for server and client
Browse files Browse the repository at this point in the history
Signed-off-by: Benedikt Bongartz <bongartz@klimlive.de>
  • Loading branch information
frzifus committed Oct 11, 2024
1 parent 076c4ef commit 1ef95ac
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
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
2 changes: 2 additions & 0 deletions cmd/tempo-query/tempo/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ type Config struct {
Address string `yaml:"address"`
Backend string `yaml:"backend"`
TLSEnabled bool `yaml:"tls_enabled" category:"advanced"`
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 +28,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 1ef95ac

Please sign in to comment.