diff --git a/CHANGELOG.md b/CHANGELOG.md index d933ec0173a..844843d0892 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -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 diff --git a/cmd/tempo-cli/main.go b/cmd/tempo-cli/main.go index 586a2ce2cec..255c107cbce 100644 --- a/cmd/tempo-cli/main.go +++ b/cmd/tempo-cli/main.go @@ -3,6 +3,7 @@ package main import ( "flag" "fmt" + "github.com/grafana/dskit/flagext" "os" "github.com/alecthomas/kong" @@ -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 } diff --git a/docs/sources/tempo/operations/tempo_cli.md b/docs/sources/tempo/operations/tempo_cli.md index fc810b3ba26..60d56e6221b 100644 --- a/docs/sources/tempo/operations/tempo_cli.md +++ b/docs/sources/tempo/operations/tempo_cli.md @@ -51,7 +51,7 @@ The backend can be configured in a few ways: * `--backend ` The storage backend type, one of `s3`, `gcs`, `azure`, and `local`. * `--bucket ` The bucket name. The meaning of this value is backend-specific. Refer to [Configuration]({{< relref "../configuration" >}}) documentation for more information. * `--s3-endpoint ` The S3 API endpoint (i.e. s3.dualstack.us-east-2.amazonaws.com). - * `--s3-user `, `--s3-password ` The S3 user name and password (or access key and secret key). + * `--s3-user `, `--s3-pass ` 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.