forked from kubernetes/test-infra
-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathgrafana.yaml
89 lines (89 loc) · 2.06 KB
/
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
82
83
84
85
86
87
88
89
apiVersion: extensions/v1beta1
kind: Deployment
metadata:
name: grafana-${PROJECT}
labels:
app: grafana
project: ${PROJECT}
spec:
replicas: 1
template:
metadata:
labels:
app: grafana
project: ${PROJECT}
spec:
containers:
- name: grafana
command:
image: grafana/grafana:4.4.2
resources:
requests:
cpu: 0m
ports:
- name: grafana-port
containerPort: 3000
volumeMounts:
- mountPath: /var/lib/grafana
name: database-volume
env:
- name: GF_SMTP_ENABLED
value: "true"
- name: GF_SMTP_HOST
value: "smtp.sendgrid.net:2525"
- name: GF_SMTP_USER
value: "kubernetes-jenkins"
- name: GF_SMTP_PASSWORD
valueFrom:
secretKeyRef:
name: smtp-password
key: password
- name: GF_AUTH_ANONYMOUS_ENABLED
value: "true"
- name: GF_USERS_ALLOW_SIGN_UP
value: "false"
- name: GF_USERS_ALLOW_ORG_CREATE
value: "false"
- name: GF_INSTALL_PLUGINS
value: "mtanda-histogram-panel"
- name: GF_ANALYTICS_GOOGLE_ANALYTICS_UA_ID
valueFrom:
configMapKeyRef:
name: grafana-${PROJECT}
key: google-analytics-uaid
volumes:
- name: database-volume
persistentVolumeClaim:
claimName: grafana-${PROJECT}-database-claim
---
apiVersion: v1
kind: Service
metadata:
labels:
app: grafana
project: ${PROJECT}
name: grafana-${PROJECT}
spec:
ports:
- name: grafana
port: 3000
targetPort: grafana-port
selector:
app: grafana
project: ${PROJECT}
---
kind: PersistentVolumeClaim
apiVersion: v1
metadata:
name: grafana-${PROJECT}-database-claim
labels:
app: grafana
project: ${PROJECT}
annotations:
volume.alpha.kubernetes.io/storage-class: value
spec:
accessModes:
- ReadWriteOnce
resources:
requests:
storage: 10Gi