Skip to content

Loki storage

UDS Core configures Loki’s storage backend, bucket names, and schema versioning through the loki Helm chart. Bundle operators can override these fields to connect Loki to external object storage and control schema migration timing.

The loki.schemaConfig.configs field controls how Loki indexes and stores log data across schema versions. UDS Core ships two schema entries: a boltdb-shipper v12 entry for backward compatibility and a tsdb v13 entry for new data.

UDS Core calculates the tsdb from date automatically based on the deployment scenario:

Scenariotsdb from dateEffect
Fresh install (no existing Loki secret)48 hours before deploymentAll data uses tsdb v13 from the start
Upgrade without existing tsdb config48 hours after deploymentExisting data stays on boltdb-shipper v12; new data transitions to tsdb v13 after the date passes
Upgrade with existing tsdb configPreserves the existing from dateNo change to schema timing

Operators who need deterministic, reproducible dates (for example, to pin schema transitions across environments) can override schemaConfig.configs directly. The following example sets explicit dates for both schema entries:

uds-bundle.yaml
overrides:
loki:
loki:
values:
- path: loki.schemaConfig.configs
value:
# Legacy schema entry, making sure to include any previous dates you used
- from: 2022-01-11
store: boltdb-shipper
object_store: "{{ .Values.loki.storage.type }}"
schema: v12
index:
prefix: loki_index_
period: 24h
# New tsdb schema, set the from date in the future for your planned migration window
- from: 2026-03-27
store: tsdb
object_store: "{{ .Values.loki.storage.type }}"
schema: v13
index:
prefix: loki_index_
period: 24h

The loki.storage fields control the object storage type, endpoint, credentials, and bucket names that Loki uses for chunk and index data.

FieldTypeDefaultDescription
loki.storage.typestring"s3"Storage backend type (for example, s3, gcs, azure)
loki.storage.bucketNames.chunksstring"uds"Bucket name for log chunk data
loki.storage.bucketNames.adminstring"uds"Bucket name for administrative data
loki.storage.s3.endpointstring"http://minio.uds-dev-stack.svc.cluster.local:9000"S3-compatible endpoint URL
loki.storage.s3.accessKeyIdstring"uds"Access key ID for S3 authentication
loki.storage.s3.secretAccessKeystring"uds-secret"Secret access key for S3 authentication
loki.storage.s3.s3ForcePathStylebooleantrueUse path-style URLs instead of virtual-hosted-style; required for MinIO and most S3-compatible providers
loki.storage.s3.insecurebooleanfalseAllow HTTP (non-TLS) connections to the storage endpoint
loki.storage.s3.regionstringunsetAWS region for the S3 bucket; required for AWS S3, not needed for MinIO

The following example shows a minimal production override for S3-compatible storage:

uds-bundle.yaml
overrides:
loki:
loki:
values:
# Storage backend type
- path: loki.storage.type
value: "s3"
# Set endpoint for MinIO or other S3-compatible providers (omit for AWS S3)
# - path: loki.storage.s3.endpoint
# value: "https://minio.example.com"
# Set to false for AWS S3; keep true for MinIO / S3-compatible providers
# - path: loki.storage.s3.s3ForcePathStyle
# value: false
variables:
# Object storage bucket for log chunks
- name: LOKI_CHUNKS_BUCKET
path: loki.storage.bucketNames.chunks
# Object storage bucket for admin data
- name: LOKI_ADMIN_BUCKET
path: loki.storage.bucketNames.admin
# AWS region (required for AWS S3)
- name: LOKI_S3_REGION
path: loki.storage.s3.region
# S3 access key ID
- name: LOKI_S3_ACCESS_KEY_ID
path: loki.storage.s3.accessKeyId
sensitive: true
# S3 secret access key
- name: LOKI_S3_SECRET_ACCESS_KEY
path: loki.storage.s3.secretAccessKey
sensitive: true

UDS Core deploys Loki in SimpleScalable mode with a replication_factor of 1. It does not override upstream chart defaults for replica counts or most query settings. For the full set of available fields, see the upstream Loki Helm chart values. For guidance on tuning replicas and resources for production workloads, see Configure high-availability logging. For compactor and retention settings, see Configure log retention.