-
Notifications
You must be signed in to change notification settings - Fork 415
/
Copy path05-dashboard.yaml
53 lines (53 loc) · 1.04 KB
/
05-dashboard.yaml
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
apiVersion: v1
kind: ConfigMap
metadata:
name: grafana-user-envs
data:
CUSTOM_RANGE_ENV: "now-1h"
---
apiVersion: grafana.integreatly.org/v1beta1
kind: GrafanaDashboard
metadata:
name: grafana-dashboard-cm-envs
spec:
instanceSelector:
matchLabels:
dashboards: "grafana"
envFrom:
- configMapKeyRef:
name: grafana-user-envs
key: "CUSTOM_RANGE_ENV"
plugins:
- name: grafana-piechart-panel
version: 1.3.9
jsonnet: >
local myRange = std.extVar('CUSTOM_RANGE_ENV');
{
id: null,
title: "Simple Dashboard wht CM envs",
tags: [],
style: "dark",
timezone: "browser",
editable: true,
hideControls: false,
graphTooltip: 1,
panels: [],
time: {
from: myRange,
to: "now"
},
timepicker: {
time_options: [],
refresh_intervals: []
},
templating: {
list: []
},
annotations: {
list: []
},
refresh: "5s",
schemaVersion: 17,
version: 0,
links: []
}