-
Notifications
You must be signed in to change notification settings - Fork 12
Expand file tree
/
Copy pathgrafana.StatefulSet.yaml
More file actions
70 lines (70 loc) · 2.07 KB
/
grafana.StatefulSet.yaml
File metadata and controls
70 lines (70 loc) · 2.07 KB
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
apiVersion: apps/v1
kind: StatefulSet
metadata:
annotations:
description: Metrics/monitoring dashboards and alerts.
kubectl.kubernetes.io/default-container: grafana
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:
- name: grafana
image: us-docker.pkg.dev/sourcegraph-images/internal/grafana:7.0.2852@sha256:b9f9e65161a90717e27bbcbb244958f4aa0f35aa4eba9e0009d637e90543dbd2
terminationMessagePolicy: FallbackToLogsOnError
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
securityContext:
allowPrivilegeEscalation: false
runAsGroup: 472
runAsUser: 472
volumes:
- name: config
configMap:
defaultMode: 0777
name: grafana
securityContext:
runAsUser: 472
fsGroup: 472
fsGroupChangePolicy: OnRootMismatch
volumeClaimTemplates:
- metadata:
name: grafana-data
spec:
accessModes: ["ReadWriteOnce"]
resources:
requests:
storage: 2Gi