forked from sourcegraph/deploy-sourcegraph
-
Notifications
You must be signed in to change notification settings - Fork 0
/
grafana.StatefulSet.yaml
65 lines (65 loc) · 1.8 KB
/
grafana.StatefulSet.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
apiVersion: apps/v1
kind: StatefulSet
metadata:
annotations:
description: Metrics/monitoring dashboards and alerts.
labels:
deploy: sourcegraph
sourcegraph-resource-requires: no-cluster-admin
app.kubernetes.io/component: grafana
name: grafana
spec:
replicas: 1
revisionHistoryLimit: 10
selector:
matchLabels:
app: grafana
serviceName: grafana
updateStrategy:
type: RollingUpdate
template:
metadata:
labels:
app: grafana
deploy: sourcegraph
spec:
containers:
- image: index.docker.io/sourcegraph/grafana:3.21.1@sha256:15a98d36f4198b7c3a5148a20985a79906c091ba9eba0d27e265f4f2e97fda98
terminationMessagePolicy: FallbackToLogsOnError
name: grafana
ports:
- containerPort: 3370
name: http
volumeMounts:
- mountPath: /var/lib/grafana
name: grafana-data
- mountPath: /sg_config_grafana/provisioning/datasources
name: config
# Grafana is relied upon to send alerts to site admins when something is wrong with
# Sourcegraph, thus its memory requests and limits are the same to guarantee it has enough
# memory to perform its job reliably and prevent conflicts with other pods on the same
# host node.
resources:
limits:
cpu: "1"
memory: 512Mi
requests:
cpu: 100m
memory: 512Mi
serviceAccountName: grafana
securityContext:
runAsUser: 0
volumes:
- name: config
configMap:
defaultMode: 0777
name: grafana
volumeClaimTemplates:
- metadata:
name: grafana-data
spec:
accessModes: [ "ReadWriteOnce"]
resources:
requests:
storage: 2Gi
storageClassName: sourcegraph