2018-02-10 23:51:55 -08:00
|
|
|
apiVersion: apps/v1
|
2017-10-22 17:00:41 -07:00
|
|
|
kind: Deployment
|
|
|
|
metadata:
|
|
|
|
name: prometheus
|
|
|
|
namespace: monitoring
|
|
|
|
spec:
|
|
|
|
replicas: 1
|
2018-02-10 23:51:55 -08:00
|
|
|
selector:
|
|
|
|
matchLabels:
|
|
|
|
name: prometheus
|
|
|
|
phase: prod
|
2017-10-22 17:00:41 -07:00
|
|
|
template:
|
|
|
|
metadata:
|
|
|
|
labels:
|
|
|
|
name: prometheus
|
|
|
|
phase: prod
|
|
|
|
spec:
|
2018-01-27 20:56:49 -08:00
|
|
|
serviceAccountName: prometheus
|
2017-10-22 17:00:41 -07:00
|
|
|
containers:
|
|
|
|
- name: prometheus
|
2018-03-18 15:55:42 -07:00
|
|
|
image: quay.io/prometheus/prometheus:v2.2.1
|
2017-10-22 17:00:41 -07:00
|
|
|
args:
|
2018-05-01 21:56:28 -07:00
|
|
|
- --config.file=/etc/prometheus/prometheus.yaml
|
|
|
|
- --storage.tsdb.path=/var/lib/prometheus
|
2017-10-22 17:00:41 -07:00
|
|
|
ports:
|
|
|
|
- name: web
|
|
|
|
containerPort: 9090
|
|
|
|
volumeMounts:
|
|
|
|
- name: config
|
|
|
|
mountPath: /etc/prometheus
|
|
|
|
- name: rules
|
|
|
|
mountPath: /etc/prometheus/rules
|
|
|
|
- name: data
|
|
|
|
mountPath: /var/lib/prometheus
|
|
|
|
dnsPolicy: ClusterFirst
|
|
|
|
restartPolicy: Always
|
|
|
|
terminationGracePeriodSeconds: 30
|
|
|
|
volumes:
|
|
|
|
- name: config
|
|
|
|
configMap:
|
|
|
|
name: prometheus-config
|
|
|
|
- name: rules
|
|
|
|
configMap:
|
|
|
|
name: prometheus-rules
|
|
|
|
- name: data
|
|
|
|
emptyDir: {}
|