From 2cf35d0f76fe3b9b7395a7a4cedd5e65571b5753 Mon Sep 17 00:00:00 2001 From: Mayne0213 Date: Thu, 8 Jan 2026 17:35:25 +0900 Subject: [PATCH] FEAT(loki): configure storage and HA - Rename extraVolume to avoid duplicate name - Add emptyDir for /var/loki cache - Migrate to shared storage with MinIO - Configure HA with 2 replicas - Revert to single replica for Single Binary mode --- grafana/helm-values.yaml | 12 ++++++++++++ loki/helm-values.yaml | 19 ++++++++++++++----- 2 files changed, 26 insertions(+), 5 deletions(-) diff --git a/grafana/helm-values.yaml b/grafana/helm-values.yaml index 557c4e4..bf1027c 100644 --- a/grafana/helm-values.yaml +++ b/grafana/helm-values.yaml @@ -3,6 +3,18 @@ fullnameOverride: grafana +replicas: 2 + +affinity: + podAntiAffinity: + preferredDuringSchedulingIgnoredDuringExecution: + - weight: 100 + podAffinityTerm: + labelSelector: + matchLabels: + app.kubernetes.io/name: grafana + topologyKey: kubernetes.io/hostname + admin: user: bluemayne # Password is managed via SealedSecret: grafana-admin-password diff --git a/loki/helm-values.yaml b/loki/helm-values.yaml index 40e5b2f..b93908a 100644 --- a/loki/helm-values.yaml +++ b/loki/helm-values.yaml @@ -20,9 +20,9 @@ loki: ruler: loki admin: loki - # Single binary mode for simplicity + # Single binary mode with 2 replicas commonConfig: - replication_factor: 1 + replication_factor: 2 # Schema config schemaConfig: @@ -49,17 +49,26 @@ loki: deploymentMode: SingleBinary singleBinary: - replicas: 1 + replicas: 2 persistence: enabled: false + affinity: + podAntiAffinity: + preferredDuringSchedulingIgnoredDuringExecution: + - weight: 100 + podAffinityTerm: + labelSelector: + matchLabels: + app.kubernetes.io/name: loki + topologyKey: kubernetes.io/hostname extraEnvFrom: - secretRef: name: minio-s3-credentials extraVolumes: - - name: tmp + - name: loki-data emptyDir: {} extraVolumeMounts: - - name: tmp + - name: loki-data mountPath: /var/loki resources: requests: