# Pinned chart: grafana/loki 7.3.0 (app 3.6.12). # Install (deferred to deploy task, namespace prometheus): # helm upgrade --install loki grafana/loki --version 7.3.0 \ # --namespace prometheus --values loki/k8s/loki-values.yaml --wait # SingleBinary, filesystem storage on local-path-retain, 14d retention. # No IngressRoute: Loki is cluster-internal, queried via Grafana datasource. deploymentMode: SingleBinary loki: # Multitenancy off: single-node homelab, gateway + Alloy + Grafana talk to one tenant. auth_enabled: false image: tag: "3.6.12" commonConfig: # Single replica: default RF=3 would require 3 ingesters and fail all writes. replication_factor: 1 storage: type: filesystem schemaConfig: configs: - from: "2024-04-01" store: tsdb object_store: filesystem schema: v13 index: prefix: index_ period: 24h compactor: retention_enabled: true delete_request_store: filesystem limits_config: retention_period: 336h rulerConfig: wal: dir: /var/loki/ruler-wal storage: type: local local: directory: /var/loki/rules # p95 84M, max 85M for the rules sidecar that shares the singleBinary pod. # The chart exposes it as `sidecar.resources`, shared with any other sidecar. sidecar: resources: requests: memory: "96Mi" cpu: "10m" limits: memory: "192Mi" singleBinary: replicas: 1 persistence: enabled: true size: 20Gi storageClass: local-path-retain resources: requests: memory: "256Mi" cpu: "200m" limits: memory: "1Gi" cpu: "1000m" # Zeroed: unused in SingleBinary mode (chart validation requires it). write: replicas: 0 read: replicas: 0 backend: replicas: 0 gateway: replicas: 1 # Single node: chart default is required podAntiAffinity on hostname + # RollingUpdate 25%/25% (effective maxUnavailable=0 at replicas=1). # That deadlocks the rollout: the new pod stays Unschedulable while the # old one lives, and the old one never leaves while the new one is not # Ready. Null clears the default (an empty map would deep-merge with it # and keep the required rule); maxUnavailable=1 allows a brief gateway # outage during rollouts instead of a stuck deploy. affinity: null deploymentStrategy: type: RollingUpdate rollingUpdate: maxSurge: 1 maxUnavailable: 1 resources: requests: memory: "32Mi" cpu: "50m" limits: memory: "128Mi" cpu: "300m" monitoring: serviceMonitor: enabled: true labels: release: prometheus-stack interval: 15s rules: enabled: true namespace: prometheus labels: release: prometheus-stack # Disabled: memcached caches don't fit a memory-tight single node. # SingleBinary works without them (slower repeated queries, fine at homelab scale). resultsCache: enabled: false chunksCache: enabled: false # Disabled: synthetic canary traffic + helm test pod, noise on a single node. lokiCanary: enabled: false test: enabled: false