thanos-io / thanos

Highly available Prometheus setup with long term storage capabilities. A CNCF Incubating project.
https://thanos.io
Apache License 2.0
13.12k stars 2.1k forks source link

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

Open antcs opened 3 weeks ago

antcs commented 3 weeks ago

Is your proposal related to a problem?

We need to override the Google API endpoint used by Thanos for GCS storage to ensure usage of GCP regional endpoints.

Describe the solution you'd like

Proposal for a solution:

  1. Add an option which can be used to configure the endpoint for the GCP storage client
  2. Enhance the GCS client to set it using the option.WithEndpoint(...): https://github.com/grafana/thanos/blob/main/scripts/cfggen/main.go
  3. It seems thanos-io/objstore is also used to support common actions with GCS. The functionality should also be added here: https://github.com/thanos-io/objstore/blob/main/providers/gcs/gcs.go

Describe alternatives you've considered

/

Additional context

/

yeya24 commented 6 days ago

I think this is a valid proposal. Help wanted.