diff --git a/monitoring/controllers/home/values.yaml b/monitoring/controllers/home/values.yaml index 51be14a..79eb43b 100644 --- a/monitoring/controllers/home/values.yaml +++ b/monitoring/controllers/home/values.yaml @@ -102,10 +102,34 @@ grafana: datasources: enabled: true label: grafana_datasource - # No persistence: Grafana state is provisioned from git, and a PVC here would - # only compete for the same disk that Prometheus needs. + # Persistence: Grafana's own sqlite DB (/var/lib/grafana/grafana.db) now lives + # on a local-path PVC on siriussec, so an in-app admin-password change and any + # session/API-key state survive a pod restart. Dashboards + datasources are + # STILL provisioned from ConfigMaps below and win over UI edits — that is the + # source of truth, and the reason only credentials/session state needed a PVC. + # 5Gi is generous for a sqlite DB that is measured in MB; the PV sits next to + # Prometheus's 10Gi on the same disk. persistence: - enabled: false + enabled: true + type: pvc + storageClassName: local-path + accessModes: + - ReadWriteOnce + size: 5Gi + # A single local-path RWO PVC cannot be mounted by old + new pod at once, so a + # rolling update deadlocks (new pod Pending on the volume). Recreate is + # required with persistence enabled. + deploymentStrategy: + type: Recreate + # Stable session-signing key. Without this Grafana generates a fresh + # secret_key on every boot, so every existing browser cookie becomes + # "user token not found" and the client bounces on /. The Secret + # monitoring/grafana-secret-key is created out of band (never in git). + envValueFrom: + GF_SECURITY_SECRET_KEY: + secretKeyRef: + name: grafana-secret-key + key: secret_key grafana.ini: auth.anonymous: enabled: false