diff --git a/prombench/docs/kind.md b/prombench/docs/kind.md index 1b997b6f8..7a77bad79 100644 --- a/prombench/docs/kind.md +++ b/prombench/docs/kind.md @@ -116,22 +116,30 @@ 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: Here’s how each option works: - **Option 1: Download data from object storage** - 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. + To download data from object storage, create a Kubernetes secret with exact named `bucket-secret` 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/prombench/manifests/prombench/benchmark/3b_prometheus-test_deployment.yaml b/prombench/manifests/prombench/benchmark/3b_prometheus-test_deployment.yaml index 1600f51da..4994b4b31 100644 --- a/prombench/manifests/prombench/benchmark/3b_prometheus-test_deployment.yaml +++ b/prombench/manifests/prombench/benchmark/3b_prometheus-test_deployment.yaml @@ -218,9 +218,6 @@ spec: # /mnt is where GKE keeps it's SSD # don't change this if you want Prometheus to take advantage of these local SSDs path: /mnt/disks/ssd0 - - name: config - hostPath: - path: /object-config - name: bucket-config # Define the Secret volume secret: secretName: bucket-secret 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 {