Fix Grafana CrashLoopBackOff — disable loki-stack sidecar datasource #20

Closed
forgejo_admin wants to merge 1 commit from 18-fix-grafana-duplicate-default-datasource-v2 into main

Summary

Grafana has been in CrashLoopBackOff for ~8 days because two datasources are marked isDefault: true. The loki-stack Helm chart auto-generates a ConfigMap that conflicts with the kube-prometheus-stack default Prometheus datasource. This PR disables the loki-stack sidecar datasource provisioning, leaving the existing custom Terraform-managed ConfigMap as the sole Loki datasource.

Changes

  • terraform/main.tf: Expanded the loki-stack grafana Helm values block to include sidecar = { datasources = { enabled = false } }, preventing the chart from auto-generating a competing default datasource ConfigMap.

Test Plan

  • tofu fmt -check passes — no formatting issues
  • tofu validate passes — valid configuration
  • tofu plan — should show only the loki-stack Helm release updating (requires cluster access)
  • After tofu apply, verify Grafana pod exits CrashLoopBackOff and starts successfully

Review Checklist

  • No secrets committed
  • No unnecessary file changes
  • Commit messages are descriptive
  • Only loki-stack Helm values modified, nothing else
  • todo-fix-grafana-duplicate-default-datasource — the bug this PR fixes
  • Forgejo issue: #18
## Summary Grafana has been in CrashLoopBackOff for ~8 days because two datasources are marked `isDefault: true`. The loki-stack Helm chart auto-generates a ConfigMap that conflicts with the kube-prometheus-stack default Prometheus datasource. This PR disables the loki-stack sidecar datasource provisioning, leaving the existing custom Terraform-managed ConfigMap as the sole Loki datasource. ## Changes - `terraform/main.tf`: Expanded the loki-stack `grafana` Helm values block to include `sidecar = { datasources = { enabled = false } }`, preventing the chart from auto-generating a competing default datasource ConfigMap. ## Test Plan - [x] `tofu fmt -check` passes — no formatting issues - [x] `tofu validate` passes — valid configuration - [ ] `tofu plan` — should show only the loki-stack Helm release updating (requires cluster access) - [ ] After `tofu apply`, verify Grafana pod exits CrashLoopBackOff and starts successfully ## Review Checklist - [x] No secrets committed - [x] No unnecessary file changes - [x] Commit messages are descriptive - [x] Only loki-stack Helm values modified, nothing else ## Related Notes - `todo-fix-grafana-duplicate-default-datasource` — the bug this PR fixes - Forgejo issue: #18
The loki-stack Helm chart auto-generates a ConfigMap with isDefault: true,
conflicting with the kube-prometheus-stack default Prometheus datasource.
Disable the loki-stack sidecar datasource provisioning since we already
manage the Loki datasource via a custom Terraform ConfigMap.

Closes #18

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Author
Owner

Closing — agent branched from stale origin/main (GitHub, now removed). Redoing with forgejo as sole remote.

Closing — agent branched from stale `origin/main` (GitHub, now removed). Redoing with `forgejo` as sole remote.
forgejo_admin closed this pull request 2026-03-06 13:11:28 +00:00

Pull request closed

Sign in to join this conversation.
No description provided.