ricsanfre / pi-cluster

Pi Kubernetes Cluster. Homelab kubernetes cluster automated with Ansible and ArgoCD
https://picluster.ricsanfre.com
MIT License
348 stars 56 forks source link

Loki 3.0 upgrade issues #388

Closed ricsanfre closed 1 month ago

ricsanfre commented 2 months ago

Issue description

Major new release 6.x of Loki helm chart, linked to new Loki 3.0, contains breaking changes. Loki installation procedure need to be reviewed.

The new helm chart requires an schema_config to install loki. 5.x helm chart provides a default schema_config.

Error: execution error at (loki/templates/validate.yaml:40:4): You must provide a schema_config for Loki, one is not provided as this will be individual for every Loki cluster. See https://grafana.com/docs/loki/latest/operations/storage/schema/ for schema information. For quick testing (with no persistence) add `--set loki.useTestSchema=true`
helm.go:84: [debug] execution error at (loki/templates/validate.yaml:40:4): You must provide a schema_config for Loki, one is not provided as this will be individual for every Loki cluster. See https://grafana.com/docs/loki/latest/operations/storage/schema/ for schema information. For quick testing (with no persistence) add `--set loki.useTestSchema=true`
ricsanfre commented 1 month ago

It can be fixed providing schema_config configuration.

  # Storage Schema
  loki:
    schemaConfig:
      configs:
      - from: 2024-04-01
        store: tsdb
        index:
          prefix: loki_index_
          period: 24h
        object_store: s3
        schema: v13

This config uses Loki's TSDB index schema which it is the recommended from Loki v2.8.

Old helm charts (previous to 3.0) were providing the following default schemaConfig value:

schema_config:
      configs:
        - from: 2022-01-11
          store: boltdb-shipper
          object_store: {{ .Values.loki.storage.type }}
          schema: v12
          index:
            prefix: loki_index_
            period: 24h

By default, if no schemaConfig was providing, schema config used was boltdb-shipper