blob: dcc6a1102e51aafa3ca4cc47333cc6cd816d8c83 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
|
# Unified Grafana Datasources ConfigMap
# This ConfigMap contains all datasources (Prometheus, Alertmanager, Loki, Tempo)
# and is directly mounted to /etc/grafana/provisioning/datasources/
#
# This approach follows the pattern from /home/paul/git/x-rag/infra/k8s/monitoring/
# where datasources are provisioned via direct ConfigMap mount instead of sidecar discovery.
#
# Benefits:
# - Simple and direct (no sidecar complexity)
# - Grafana provisioning runs on startup
# - Field order preserved exactly as written
# - All datasources in one place
# - Fully IaC compliant
apiVersion: v1
kind: ConfigMap
metadata:
name: grafana-datasources-all
namespace: monitoring
labels:
app.kubernetes.io/name: grafana
app.kubernetes.io/component: datasources
data:
datasources.yaml: |
apiVersion: 1
datasources:
- name: Prometheus
type: prometheus
uid: prometheus
url: http://prometheus-kube-prometheus-prometheus.monitoring:9090/
access: proxy
isDefault: true
editable: false
jsonData:
httpMethod: POST
timeInterval: 30s
- name: Alertmanager
type: alertmanager
uid: alertmanager
url: http://prometheus-kube-prometheus-alertmanager.monitoring:9093/
access: proxy
editable: false
jsonData:
handleGrafanaManagedAlerts: false
implementation: prometheus
- name: Loki
type: loki
uid: loki
url: http://loki.monitoring.svc.cluster.local:3100
access: proxy
isDefault: false
editable: false
jsonData:
maxLines: 1000
- name: Tempo
type: tempo
uid: tempo
url: http://tempo.monitoring.svc.cluster.local:3200
access: proxy
isDefault: false
editable: false
jsonData:
httpMethod: GET
tracesToLogsV2:
datasourceUid: loki
spanStartTimeShift: -1h
spanEndTimeShift: 1h
tracesToMetrics:
datasourceUid: prometheus
serviceMap:
datasourceUid: prometheus
nodeGraph:
enabled: true
search:
hide: false
lokiSearch:
datasourceUid: loki
|