From ea3bb60ee9abf9805bfff87b53be0484576332b6 Mon Sep 17 00:00:00 2001 From: Farid Mammadov Date: Fri, 1 Nov 2024 14:10:41 +0400 Subject: [PATCH] add option to skip s3 certificate verification --- cmd/tempo-cli/main.go | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/cmd/tempo-cli/main.go b/cmd/tempo-cli/main.go index 3d046e79dd5..08a7f872780 100644 --- a/cmd/tempo-cli/main.go +++ b/cmd/tempo-cli/main.go @@ -30,9 +30,10 @@ type backendOptions struct { Backend string `help:"backend to connect to (s3/gcs/local/azure), optional, overrides backend in config file" enum:",s3,gcs,local,azure" default:""` Bucket string `help:"bucket (or path on local backend) to scan, optional, overrides bucket in config file"` - S3Endpoint string `name:"s3-endpoint" help:"s3 endpoint (s3.dualstack.us-east-2.amazonaws.com), optional, overrides endpoint in config file"` - S3User string `name:"s3-user" help:"s3 username, optional, overrides username in config file"` - S3Pass string `name:"s3-pass" help:"s3 password, optional, overrides password in config file"` + S3Endpoint string `name:"s3-endpoint" help:"s3 endpoint (s3.dualstack.us-east-2.amazonaws.com), optional, overrides endpoint in config file"` + S3User string `name:"s3-user" help:"s3 username, optional, overrides username in config file"` + S3Pass string `name:"s3-pass" help:"s3 password, optional, overrides password in config file"` + InsecureSkipVerify bool `name:"insecure-skip-verify" help:"skip TLS verification" default:"false"` } var cli struct { @@ -131,6 +132,8 @@ func loadBackend(b *backendOptions, g *globalOptions) (backend.Reader, backend.W cfg.StorageConfig.Trace.Azure.ContainerName = b.Bucket } + cfg.StorageConfig.Trace.S3.InsecureSkipVerify = b.InsecureSkipVerify + if b.S3Endpoint != "" { cfg.StorageConfig.Trace.S3.Endpoint = b.S3Endpoint }