-
Notifications
You must be signed in to change notification settings - Fork 12
Expand file tree
/
Copy pathprometheus.Deployment.yaml
More file actions
80 lines (80 loc) · 2.41 KB
/
prometheus.Deployment.yaml
File metadata and controls
80 lines (80 loc) · 2.41 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
71
72
73
74
75
76
77
78
79
80
apiVersion: apps/v1
kind: Deployment
metadata:
annotations:
description: Collects metrics and aggregates them into graphs.
labels:
deploy: sourcegraph
sourcegraph-resource-requires: no-cluster-admin
app.kubernetes.io/component: prometheus
name: prometheus
spec:
minReadySeconds: 10
replicas: 1
revisionHistoryLimit: 10
selector:
matchLabels:
app: prometheus
strategy:
type: Recreate
template:
metadata:
labels:
deploy: sourcegraph
app: prometheus
spec:
containers:
- name: prometheus
image: index.docker.io/sourcegraph/prometheus:7.0.0@sha256:69acd1102e5fc8458a75c17ffaf512a9246b95d4f0e4ab1cacd7f47170823d51
terminationMessagePolicy: FallbackToLogsOnError
env:
- name: SG_NAMESPACE
valueFrom:
fieldRef:
fieldPath: metadata.namespace
readinessProbe:
httpGet:
path: /-/ready
port: 9090
timeoutSeconds: 3
failureThreshold: 120
periodSeconds: 5
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.
#
# The limit chosen here is based on what works reliably on Sourcegraph.com with lots
# of traffic.
resources:
limits:
cpu: "2"
memory: 6G
requests:
cpu: 500m
memory: 6G
securityContext:
allowPrivilegeEscalation: false
runAsGroup: 100
runAsUser: 100
terminationGracePeriodSeconds: 120
securityContext:
runAsUser: 100
fsGroup: 100
fsGroupChangePolicy: "OnRootMismatch"
volumes:
- name: data
persistentVolumeClaim:
claimName: prometheus
- configMap:
defaultMode: 0777
name: prometheus
name: config