generated from nginx/template-repository
-
Notifications
You must be signed in to change notification settings - Fork 8
/
Copy path2.grafana.yaml
81 lines (78 loc) · 1.6 KB
/
2.grafana.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
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
name: pvc-grafana-data
annotations:
nfs.io/storage-path: grafana/data
spec:
accessModes:
- ReadWriteMany
resources:
requests:
storage: 1Gi
---
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
name: pvc-grafana-log
annotations:
nfs.io/storage-path: grafana/log
spec:
accessModes:
- ReadWriteMany
resources:
requests:
storage: 1Gi
---
apiVersion: apps/v1
kind: Deployment
metadata:
name: grafana
labels:
app: grafana
spec:
selector:
matchLabels:
app: grafana
replicas: 1
template:
metadata:
labels:
app: grafana
spec:
containers:
- name: grafana
image: grafana/grafana
ports:
- containerPort: 3000
volumeMounts:
- name: grafana-data
mountPath: /var/lib/grafana
- name: grafana-log
mountPath: /var/log/grafana
env:
# Clickhouse datasource plugin installation
# https://grafana.com/grafana/plugins/vertamedia-clickhouse-datasource/?tab=installation
# grafana-cli plugins install vertamedia-clickhouse-datasource
- name: GF_INSTALL_PLUGINS
value: vertamedia-clickhouse-datasource
volumes:
- name: grafana-data
persistentVolumeClaim:
claimName: pvc-grafana-data
- name: grafana-log
persistentVolumeClaim:
claimName: pvc-grafana-log
---
apiVersion: v1
kind: Service
metadata:
name: grafana
labels:
app: grafana
spec:
ports:
- port: 3000
selector:
app: grafana
type: ClusterIP