--- # Loki — log aggregation (docs/10). Serves R-OBS-01. PVC size is an overlay knob (R-ENV-02). # # DEV-SCOPED for the ~22 GiB ceiling. Deployment mode is SingleBinary (one pod, filesystem # storage) — the scalable read/write/backend split is prod-only. CRITICAL RAM TRIM: the grafana # loki chart's default memcached caches (chunksCache/resultsCache) request ~8-9 GiB EACH; both are # disabled here. The nginx `gateway`, self-monitoring, and the canary/test hooks are disabled too. # # Retention is enforced by the COMPACTOR (retention_enabled: true) — a retention_period alone does # nothing (docs/10, and a known-gotcha carried from the legacy stack). apiVersion: helm.toolkit.fluxcd.io/v2 kind: HelmRelease metadata: name: loki namespace: monitoring spec: interval: 30m chart: spec: chart: loki version: ">=7.0.0 <8.0.0" # chart 7.x (Loki 3.6.x); Renovate maintains. Verified: chart 7 renders identically # for this SingleBinary/filesystem config (one `loki` StatefulSet, no extra pods). sourceRef: kind: HelmRepository name: grafana namespace: monitoring install: remediation: retries: 3 upgrade: remediation: retries: 3 values: deploymentMode: SingleBinary loki: auth_enabled: false commonConfig: replication_factor: 1 # single binary — no ring replication storage: type: filesystem schemaConfig: configs: - from: "2024-04-01" store: tsdb object_store: filesystem schema: v13 index: prefix: loki_index_ period: 24h limits_config: # NOTE: Loki's LOG retention has no dedicated cluster-vars knob (only the 3 monitoring vars # exist). Held to a dev-friendly 72h to mirror the dev metrics retention; promote to an # overlay knob if per-env log retention is ever needed. See README / report. retention_period: 72h compactor: retention_enabled: true # REQUIRED — a period alone does not delete (docs/10) delete_request_store: filesystem singleBinary: replicas: 1 persistence: enabled: true storageClass: longhorn # replicated tier (ADR-0003) size: ${MONITORING_LOKI_PVC_SIZE} # overlay knob (dev 5Gi / prod large) resources: requests: cpu: 100m memory: 192Mi limits: memory: 512Mi # Not used in SingleBinary mode — pinned to 0 so a chart default can't spin up extra pods. backend: replicas: 0 read: replicas: 0 write: replicas: 0 # --- RAM trims: kill the memory-hungry / non-essential-for-dev pieces --- chunksCache: enabled: false # default memcached requests ~8-9Gi — must stay off in dev resultsCache: enabled: false gateway: enabled: false # no nginx front door needed for a single binary in-cluster lokiCanary: enabled: false test: enabled: false # Alloy ships logs here (in-cluster service DNS, no gateway): # http://loki.monitoring.svc.cluster.local:3100/loki/api/v1/push