forked from sourcegraph/deploy-sourcegraph
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathprometheus.Deployment.yaml
72 lines (72 loc) · 2.09 KB
/
prometheus.Deployment.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
apiVersion: apps/v1
kind: Deployment
metadata:
annotations:
description: Collects metrics and aggregates them into graphs.
labels:
deploy: sourcegraph
name: prometheus
spec:
minReadySeconds: 10
replicas: 1
revisionHistoryLimit: 10
selector:
matchLabels:
app: prometheus
strategy:
type: Recreate
template:
metadata:
labels:
app: prometheus
spec:
containers:
- image: index.docker.io/sourcegraph/prometheus:3.15.1@sha256:18c0faddbddb8007e3120a2926b970119ceb031ab3eaa9632c2f481e4cc3f2bb
terminationMessagePolicy: FallbackToLogsOnError
name: prometheus
readinessProbe:
httpGet:
path: /-/ready
port: 9090
initialDelaySeconds: 30
timeoutSeconds: 30
livenessProbe:
httpGet:
path: /-/healthy
port: 9090
initialDelaySeconds: 30
timeoutSeconds: 30
ports:
- containerPort: 9090
name: http
volumeMounts:
- mountPath: /prometheus
name: data
- mountPath: /sg_prometheus_add_ons
name: config
# Prometheus is relied upon to monitor services for sending 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.
#
# Its average memory usage may be much lower than 3G if Sourcegraph itself does not have
# much traffic, the 3G number chosen here is what works reliably on Sourcegraph.com with
# lots of traffic.
resources:
limits:
cpu: "2"
memory: 3G
requests:
cpu: 500m
memory: 3G
securityContext:
runAsUser: 0
serviceAccountName: prometheus
volumes:
- name: data
persistentVolumeClaim:
claimName: prometheus
- configMap:
defaultMode: 0777
name: prometheus
name: config