blumeops/argocd/manifests/grafana/kustomization.yaml
Erich Blume 4ca2e39901 Externalize TeslaMate dashboards to forge mirror (#296)
## Summary
- Replaces 18 TeslaMate dashboard ConfigMaps (713 KB / 22,080 lines) with a Grafana init container
- Init container fetches dashboard JSON directly from `mirrors/teslamate` on forge, pinned to `v3.0.0`
- Grafana's file provider picks them up from `/tmp/dashboards/TeslaMate/` via `foldersFromFilesStructure`
- Non-TeslaMate dashboards remain as ConfigMaps (unchanged)

## How it works
- New `init-teslamate-dashboards` init container uses busybox `wget` to fetch each JSON file from `https://forge.eblu.me/mirrors/teslamate/raw/tag/v3.0.0/grafana/dashboards/`
- Files land in `/tmp/dashboards/TeslaMate/`, same emptyDir volume the sidecar uses
- The sidecar continues to handle ConfigMap-based dashboards; the init container handles TeslaMate
- Version pin is in the init container args (TESLAMATE_VERSION)

## Deployment and Testing
- [ ] Sync `grafana` app from branch — verify init container runs and fetches dashboards
- [ ] Sync `grafana-config` app from branch — verify TeslaMate ConfigMaps are pruned
- [ ] Check Grafana UI: TeslaMate folder should still contain all 18 dashboards
- [ ] Verify non-TeslaMate dashboards are unaffected
- [ ] After merge: sync both apps from main

Reviewed-on: #296
2026-03-15 18:31:19 -07:00

38 lines
851 B
YAML

apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
namespace: monitoring
resources:
- serviceaccount.yaml
- pvc.yaml
- deployment.yaml
- service.yaml
- rbac.yaml
images:
- name: docker.io/library/alpine
newTag: "3.21"
- name: docker.io/library/busybox
newTag: 1.31.1
- name: registry.ops.eblu.me/blumeops/grafana-sidecar
newTag: v1.28.0-a2bb9ab
- name: registry.ops.eblu.me/blumeops/grafana
newTag: v12.3.3-d05d2fb
configMapGenerator:
- name: grafana
files:
- grafana.ini
- datasources.yaml
options:
labels:
app.kubernetes.io/name: grafana
app.kubernetes.io/instance: grafana
- name: grafana-config-dashboards
files:
- provider.yaml
options:
labels:
app.kubernetes.io/name: grafana
app.kubernetes.io/instance: grafana