Cannot configure Loki to access GCS storage

Hi, I’m strugling with accessing my buckets from loki. I guess I have to specify some service account somewhere but I didn’t find any example of how.

here is my simple helm values file.

deploymentMode: SingleBinary
memcachedExporter:
  enabled: false
chunksCache:
  enabled: false
loki:
  auth_enabled: false
  commonConfig:
    replication_factor: 1
#  limits_config:
#    allow_structured_metadata: false
  schemaConfig:
    configs:
      - from: "2024-01-01"
        store: tsdb
        index:
          prefix: loki_index_
          period: 24h
        object_store: gcs
        schema: v13
  storage:
    type: 'gcs'
    bucketNames:
      chunks: my_loki-update_chunks
    filesystem:
      directory: /data/loki/chunks
singleBinary:
  replicas: 1
write:
  replicas: 0
  extraEnv:
    - name: GOOGLE_APPLICATION_CREDENTIALS
      value: /var/secrets/google/key.json
read:
  replicas: 0
  extraEnv:
    - name: GOOGLE_APPLICATION_CREDENTIALS
      value: /var/secrets/google/key.json
backend:
  replicas: 0

can you help ?
thanks.

Hi pdelorme. You can check this one: using gcs for storage with default helm templates results in "caller=flush.go:156 org_id=fake msg="failed to flush user" err="googleapi: Error 401: Invalid Credentials, authError"" · Issue #932 · grafana/loki · GitHub