Commit c3a45f8
fix(grafana): Resolve issue with add-grafana make command & add new K8s dashboard (#1018)
## Summary
- Moved Grafana resources (`grafana.yaml`, dashboards, RBAC) into the
`with-grafana` overlay
- Fixed Grafana Prometheus auth: init container injects SA token into
datasource config at pod startup
- Fixed PVC mount path (`/var/lib/grafana` instead of
`/var/lib/grafana/data`) so `grafana.db` persists across restarts
- Removed `GF_SECURITY_ADMIN_PASSWORD` env var that was resetting
password on every restart
- Added K8s infrastructure dashboards (cluster, nodes, namespace, pods)
- PVC is managed separately from kustomize so `make clean-observability`
preserves Grafana data
## Dashboards
| Dashboard | Screenshot | Description |
|-----------|------------|-------------|
| K8s Cluster Monitoring |

| Cluster-level CPU, memory, network |
| K8s Nodes |

| Node-level resource usage |
| K8s Namespace |
|
Namespace-level resource usage |
| K8s Pods |

| Pod-level resource usage |
## Test plan
- [x] `make add-grafana` deploys without errors
- [x] `make clean-observability` removes stack but preserves PVC
- [x] Grafana password persists across pod restarts
- [x] All dashboards load and show data from Prometheus
> Note: These charts are taken from community dashboards like
https://github.com/dotdc/grafana-dashboards-kubernetes, so some data
might be missing depending on the cluster setup. I'll be addressing them
in another change request.
<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit
* **New Features**
* Introduced pre-provisioned Grafana dashboards for Kubernetes cluster
and pod monitoring, automatically deployed without manual configuration.
* Added simplified Grafana installation workflow using the `make
add-grafana` command.
* **Documentation**
* Updated installation and cleanup instructions for Grafana.
* Added comprehensive guide for managing and customizing dashboards.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
---------
Signed-off-by: Rahul Shetty <rashetty@redhat.com>
Co-authored-by: Jeremy Eder <jeder@redhat.com>1 parent e537e06 commit c3a45f8
19 files changed
Lines changed: 12509 additions & 530 deletions
File tree
- components/manifests/observability
- base
- overlays/with-grafana
- dashboards
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
288 | 288 | | |
289 | 289 | | |
290 | 290 | | |
| 291 | + | |
291 | 292 | | |
292 | 293 | | |
293 | 294 | | |
294 | 295 | | |
295 | | - | |
| 296 | + | |
296 | 297 | | |
297 | 298 | | |
298 | 299 | | |
299 | 300 | | |
| 301 | + | |
300 | 302 | | |
301 | 303 | | |
302 | 304 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
40 | 40 | | |
41 | 41 | | |
42 | 42 | | |
43 | | - | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
44 | 47 | | |
45 | 48 | | |
46 | 49 | | |
47 | | - | |
| 50 | + | |
48 | 51 | | |
49 | 52 | | |
50 | 53 | | |
| |||
53 | 56 | | |
54 | 57 | | |
55 | 58 | | |
56 | | - | |
| 59 | + | |
57 | 60 | | |
58 | 61 | | |
59 | | - | |
| 62 | + | |
60 | 63 | | |
61 | 64 | | |
62 | 65 | | |
| |||
185 | 188 | | |
186 | 189 | | |
187 | 190 | | |
188 | | - | |
189 | | - | |
| 191 | + | |
| 192 | + | |
190 | 193 | | |
Lines changed: 8 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
0 commit comments