forked from kubernetes/test-infra
-
Notifications
You must be signed in to change notification settings - Fork 0
/
prometheus.yaml
77 lines (77 loc) · 1.78 KB
/
prometheus.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
apiVersion: extensions/v1beta1
kind: Deployment
metadata:
name: prometheus-${PROJECT}
labels:
app: prometheus
project: ${PROJECT}
spec:
replicas: 1
template:
metadata:
labels:
app: prometheus
project: ${PROJECT}
spec:
containers:
- name: prometheus
image: prom/prometheus:v1.1.3
args:
- -config.file=/etc/prometheus/prometheus.yml
- -storage.local.path=/prometheus
- -web.console.libraries=/usr/share/prometheus/console_libraries
- -web.console.templates=/usr/share/prometheus/consoles
- -storage.local.retention=35064h
resources:
requests:
cpu: 0m
ports:
- name: prometheus-port
containerPort: 9090
volumeMounts:
- mountPath: /prometheus
name: database-volume
- mountPath: /etc/prometheus
name: prometheus-config
volumes:
- name: database-volume
persistentVolumeClaim:
claimName: prometheus-${PROJECT}-database-claim
- name: prometheus-config
configMap:
name: prometheus-${PROJECT}
items:
- key: prometheus-config.yml
path: prometheus.yml
---
apiVersion: v1
kind: Service
metadata:
name: prometheus-${PROJECT}
labels:
app: prometheus
project: ${PROJECT}
spec:
ports:
- name: prometheus
port: 9090
targetPort: prometheus-port
selector:
app: prometheus
project: ${PROJECT}
---
kind: PersistentVolumeClaim
apiVersion: v1
metadata:
name: prometheus-${PROJECT}-database-claim
labels:
app: prometheus
project: ${PROJECT}
annotations:
volume.alpha.kubernetes.io/storage-class: value
spec:
accessModes:
- ReadWriteOnce
resources:
requests:
storage: 100Gi