Skip to content

gcs: add custom_endpoint config option for GCS regional endpoints#258

Open
Retr0-XD wants to merge 1 commit intothanos-io:mainfrom
Retr0-XD:feat/gcs-custom-endpoint-7862
Open

gcs: add custom_endpoint config option for GCS regional endpoints#258
Retr0-XD wants to merge 1 commit intothanos-io:mainfrom
Retr0-XD:feat/gcs-custom-endpoint-7862

Conversation

@Retr0-XD
Copy link

What does this PR do?

Adds a custom_endpoint configuration field to the GCS Config struct, allowing users to override the default Google Cloud Storage API endpoint.

This is useful for:

  • Connecting to GCS regional endpoints for data residency compliance
  • Connecting to GCS-compatible storage services

When set, the endpoint is passed to the GCS client via option.WithEndpoint().

New config field:

type: GCS
config:
  bucket: my-bucket
  custom_endpoint: "https://storage.us-east4.rep.googleapis.com"

Checklist

  • Added custom_endpoint field to Config struct with YAML tag custom_endpoint
  • Applied option.WithEndpoint() when the field is non-empty in NewBucketWithConfig
  • Backward compatible (empty string means no override, preserves existing behavior)

Closes thanos-io/thanos#7862

Adds a `custom_endpoint` configuration field to the GCS Config struct,
allowing users to override the default Google Cloud Storage API endpoint.

This is useful for:
- Connecting to GCS regional endpoints for data residency compliance
  (https://cloud.google.com/storage/docs/regional-endpoints)
- Connecting to GCS-compatible storage services

When set, the endpoint is passed to the GCS client via option.WithEndpoint().

Fixes: thanos-io/thanos#7862
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Support setting endpoint for Google Cloud Storage (GCS) in Thanos

1 participant