S3 endpoint with simple scalable deployment with Helm


I try to deploy Loki using Helm via simple scalable deployment chart 1.6.1 and Loki 2.5.0 image.
the both read & write pods containers have errors when connecting to the S3 endpoint, here’s my config :

  config.yaml: |
    auth_enabled: true
      path_prefix: /var/loki
      replication_factor: 3
          access_key_id: <key_id>
          bucketnames: loki
          endpoint: https://my.s3.endpoint.com
          insecure: false
          region: null
          s3: null
          s3forcepathstyle: false
          secret_access_key: <key_secret>

In logs I can see theses errors :

err=“RequestError: send request failed\ncaused by: Put "https://loki.my.s3.endpoint.com/dev/789eb3fff04dd168/181d40e30aa%3A181d47c42dc%3A1e1826a6\”: dial tcp: lookup loki.my.s3.endpoint.com on no such host"

I don’t understand why the endpoint url is generated with the bucketname, that is create an unknown domain.


I believe that you need to change your bucketname structure to the following…

  chunks: chunks
  ruler: ruler
  admin: admin

If I set this bucketname structure in my Helm config, I get the same problem.

The write container tries to join chunks.my.s3.endpoint.com and the read container tries to join ruler.my.s3.endpoint.com

The solution is to set to true the s3forcepathstyle parameter