Skip to content

Commit

Permalink
use S3User and S3Pass parameters in tempo-cli
Browse files Browse the repository at this point in the history
  • Loading branch information
faridtmammadov committed Nov 1, 2024
1 parent 64a42e9 commit 77768ab
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions cmd/tempo-cli/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ package main
import (
"flag"
"fmt"
"github.com/grafana/dskit/flagext"
"os"

"github.com/alecthomas/kong"
Expand Down Expand Up @@ -135,6 +136,14 @@ func loadBackend(b *backendOptions, g *globalOptions) (backend.Reader, backend.W
cfg.StorageConfig.Trace.S3.InsecureSkipVerify = b.InsecureSkipVerify
cfg.StorageConfig.Trace.GCS.Insecure = b.InsecureSkipVerify

if b.S3User != "" {
cfg.StorageConfig.Trace.S3.AccessKey = b.S3User
}

if b.S3Pass != "" {
cfg.StorageConfig.Trace.S3.SecretKey = flagext.SecretWithValue(b.S3Pass)
}

if b.S3Endpoint != "" {
cfg.StorageConfig.Trace.S3.Endpoint = b.S3Endpoint
}
Expand Down

0 comments on commit 77768ab

Please sign in to comment.