-
Notifications
You must be signed in to change notification settings - Fork 6
/
statefulset.yaml
50 lines (50 loc) · 1.25 KB
/
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
apiVersion: apps/v1
kind: StatefulSet
metadata:
name: prometheus
namespace: monitoring
labels:
app: prometheus
spec:
selector:
matchLabels:
app: prometheus
serviceName: prometheus
replicas: 1
template:
metadata:
labels:
app: prometheus
annotations:
prometheus.io/scrape: "true"
prometheus.io/port: "9090"
spec:
containers:
- name: prometheus
image: quay.io/prometheus/prometheus
imagePullPolicy: IfNotPresent
args:
- '--storage.tsdb.retention=6h'
- '--storage.tsdb.path=/prometheus'
- '--config.file=/etc/prometheus/prometheus.yml'
- '--web.enable-lifecycle'
command:
- /bin/prometheus
ports:
- name: web
containerPort: 9090
volumeMounts:
- name: config-volume
mountPath: /etc/prometheus
- name: data
mountPath: /prometheus
restartPolicy: Always
securityContext: {}
serviceAccountName: prometheus
terminationGracePeriodSeconds: 30
volumes:
- name: config-volume
configMap:
name: prometheus-config
- name: data
emptyDir: {}