-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathprometheus-statefulset.yaml
110 lines (110 loc) · 2.89 KB
/
prometheus-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
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
apiVersion: apps/v1beta1
kind: StatefulSet
metadata:
labels:
prometheus: k8s
name: prometheus-k8s
namespace: monitoring
spec:
selector:
matchLabels:
app: prometheus
prometheus: k8s
serviceName: prometheus-operated
template:
metadata:
labels:
app: prometheus
prometheus: k8s
spec:
containers:
- args:
- --config.file=/etc/prometheus/config/prometheus.yaml
- --storage.tsdb.path=/var/prometheus/data
- --storage.tsdb.retention=720h
- --web.route-prefix=/
- --web.enable-lifecycle
- --web.enable-admin-api
image: quay.io/prometheus/prometheus:v2.0.0-beta.0
imagePullPolicy: IfNotPresent
livenessProbe:
failureThreshold: 10
httpGet:
path: /status
port: web
scheme: HTTP
initialDelaySeconds: 300
periodSeconds: 5
successThreshold: 1
timeoutSeconds: 3
name: prometheus
ports:
- containerPort: 9090
name: web
protocol: TCP
readinessProbe:
failureThreshold: 6
httpGet:
path: /status
port: web
scheme: HTTP
periodSeconds: 5
successThreshold: 1
timeoutSeconds: 3
resources:
requests:
memory: 5Gi
terminationMessagePath: /dev/termination-log
terminationMessagePolicy: File
volumeMounts:
- mountPath: /etc/prometheus/config
name: config
readOnly: true
- mountPath: /etc/prometheus/rules
name: rules
readOnly: true
- mountPath: /var/prometheus/data
name: prometheus-k8s-db
subPath: prometheus-db
- args:
- -webhook-url=http://localhost:9090/-/reload
- -volume-dir=/etc/prometheus/config
- -volume-dir=/etc/prometheus/rules
image: quay.io/coreos/configmap-reload:v0.0.1
imagePullPolicy: IfNotPresent
name: prometheus-config-reloader
resources:
limits:
cpu: 5m
memory: 10Mi
volumeMounts:
- mountPath: /etc/prometheus/config
name: config
readOnly: true
- mountPath: /etc/prometheus/rules
name: rules
dnsPolicy: ClusterFirst
restartPolicy: Always
serviceAccount: prometheus-k8s
serviceAccountName: prometheus-k8s
terminationGracePeriodSeconds: 600
volumes:
- configMap:
defaultMode: 420
name: prometheus-k8s
name: config
- configMap:
defaultMode: 420
name: prometheus-k8s-rules
name: rules
updateStrategy:
type: RollingUpdate
volumeClaimTemplates:
- metadata:
name: prometheus-k8s-db
spec:
accessModes:
- ReadWriteOnce
resources:
requests:
storage: 1Ti