-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmon-prom.yml
80 lines (80 loc) · 1.76 KB
/
mon-prom.yml
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:
name: <name>
namespace: <namespace>
labels:
app: monitor
name: <name>
spec:
replicas: 1
strategy:
type: Recreate
selector:
matchLabels:
name: <name>
template:
metadata:
labels:
name: <name>
spec:
serviceAccountName: prometheus
nodeSelector:
env: <clientId>
monitor: <nodeLabel>
priorityClassName: class-monitor
containers:
- name: <name>
image: 3dsinteractive/prometheus:2.0
ports:
- name: prometheus9090
containerPort: 9090
resources:
requests:
memory: 200Mi
cpu: 100m
limits:
memory: 1Gi
cpu: 300m
livenessProbe:
tcpSocket:
port: 9090
initialDelaySeconds: 30
timeoutSeconds: 1
periodSeconds: 300
readinessProbe:
tcpSocket:
port: 9090
initialDelaySeconds: 30
timeoutSeconds: 1
periodSeconds: 30
failureThreshold: 5
volumeMounts:
- mountPath: /opt/bitnami/prometheus/conf
name: vol-config
- mountPath: /etc/alert-rules
name: vol-config-alert-rules
volumes:
- name: vol-config
configMap:
name: prom-config
- name: vol-config-alert-rules
configMap:
name: prom-alert-rules
---
apiVersion: v1
kind: Service
metadata:
name: <name>
namespace: <namespace>
labels:
app: monitor
name: prometheus
spec:
selector:
name: <name>
ports:
- port: 9090
name: prometheus9090
targetPort: 9090
protocol: TCP