diff --git a/prombench/docs/kind.md b/prombench/docs/kind.md index 1b997b6f8..23f218685 100644 --- a/prombench/docs/kind.md +++ b/prombench/docs/kind.md @@ -116,7 +116,7 @@ If used with the GitHub integration: 2. ### Setting Up Benchmarking Data -When setting up a benchmarking environment, it’s often useful to have pre-generated data available. This data can help speed up testing and make benchmarks more realistic by simulating actual workloads. +When setting up a benchmarking environment, it’s often useful to have pre-generated data available.This data can help speed up testing and make benchmarks more realistic by simulating actual workloads. In this setup, you have two choices: @@ -125,13 +125,21 @@ Here’s how each option works: To download data from object storage, create a Kubernetes secret with exact named `bucket-config` and file name ```object-config.yml``` with the necessary credentials as per your object storage. This secret enables access to the stored data. > Note: Make sure this secret applied before ```3b_prometheus-test_deployment.yaml``` -- **Option 2: Skip downloading data** - If you don’t need to download data, edit the `3b_prometheus-test_deployment.yaml` file: +- **Option 2: Skip downloading data** - - Remove the `bucket-config` volume section from. - - Remove the `volumeMount` section name `bucket-config` from `data-downloader`. -> Note: You have to remove these two sections from both prometheus-test-pr-{{ .PR_NUMBER }} and prometheus-test-{{ normalise .RELEASE }} deployments. +If you don’t Want to Download data create an empty secret like this - + +```yaml +# Empty Secret to Skip Downloading Data +apiVersion: v1 +kind: Secret +metadata: + name: bucket-secret + namespace: prombench-{{ .PR_NUMBER }} +type: Opaque +stringData: + object-config.yml: 3. Deploy the Kubernetes objects: > **_Note:_** If you encounter a `too many files open` error caused by promtail, increase the default value of `/proc/sys/fs/inotify/max_user_instances` from 128 to 512: diff --git a/tools/block-sync/upload_download.go b/tools/block-sync/upload_download.go index 3bd3dc213..363c477b0 100644 --- a/tools/block-sync/upload_download.go +++ b/tools/block-sync/upload_download.go @@ -38,6 +38,10 @@ func newStore(tsdbPath, objectConfig, objectKey string, logger *slog.Logger) (*S if err != nil { return nil, fmt.Errorf("failed to read config file: %w", err) } + if len(configBytes) == 0 { + fmt.Println("Config file is empty, exiting container.") + os.Exit(0) + } bucket, err := client.NewBucket(log.NewNopLogger(), configBytes, "block-sync") if err != nil {