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 cf960bd commit 2b56810
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 1 deletion.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@
* [BUGFIX] Pushes a 0 to classic histogram's counter when the series is new to allow Prometheus to start from a non-null value. [#4140](https://github.com/grafana/tempo/pull/4140) (@mapno)
* [BUGFIX] Fix counter samples being downsampled by backdate to the previous minute the initial sample when the series is new [#44236](https://github.com/grafana/tempo/pull/4236) (@javiermolinar)
* [BUGFIX] Skip computing exemplars for instant queries. [#4204](https://github.com/grafana/tempo/pull/4204) (@javiermolinar)
* [BUGFIX] Utilize S3Pass and S3User parameters in tempo-cli options, which were previously unused in the code. [#44236](https://github.com/grafana/tempo/pull/4259) (@faridtmammadov)

# v2.6.1

Expand Down
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
2 changes: 1 addition & 1 deletion docs/sources/tempo/operations/tempo_cli.md
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ The backend can be configured in a few ways:
* `--backend <value>` The storage backend type, one of `s3`, `gcs`, `azure`, and `local`.
* `--bucket <value>` The bucket name. The meaning of this value is backend-specific. Refer to [Configuration]({{< relref "../configuration" >}}) documentation for more information.
* `--s3-endpoint <value>` The S3 API endpoint (i.e. s3.dualstack.us-east-2.amazonaws.com).
* `--s3-user <value>`, `--s3-password <value>` The S3 user name and password (or access key and secret key).
* `--s3-user <value>`, `--s3-pass <value>` The S3 user name and password (or access key and secret key).
Optional, as Tempo CLI supports the same authentication mechanisms as Tempo. See [S3 permissions documentation]({{< relref "../configuration/hosted-storage/s3" >}}) for more information.
* `--insecure-skip-verify` skip TLS verification, only applies to S3 and GCS.

Expand Down

0 comments on commit 2b56810

Please sign in to comment.