2017-03-14 16:19:54 +01:00
|
|
|
apiVersion: v1
|
|
|
|
kind: ConfigMap
|
|
|
|
metadata:
|
2017-03-17 08:05:57 +01:00
|
|
|
name: prometheus-config-reloader-example
|
2017-03-14 16:19:54 +01:00
|
|
|
data:
|
|
|
|
---
|
|
|
|
apiVersion: extensions/v1beta1
|
|
|
|
kind: Deployment
|
|
|
|
metadata:
|
2017-03-17 08:05:57 +01:00
|
|
|
name: prometheus-config-reloader
|
2017-03-14 16:19:54 +01:00
|
|
|
spec:
|
|
|
|
replicas: 1
|
|
|
|
template:
|
|
|
|
metadata:
|
|
|
|
labels:
|
2017-03-17 08:05:57 +01:00
|
|
|
app: prometheus-config-reloader
|
2017-03-14 16:19:54 +01:00
|
|
|
spec:
|
|
|
|
volumes:
|
2017-03-15 14:14:03 +01:00
|
|
|
- name: rules
|
2017-03-14 16:19:54 +01:00
|
|
|
emptyDir: {}
|
2017-03-15 14:14:03 +01:00
|
|
|
- name: config
|
2017-03-14 16:19:54 +01:00
|
|
|
configMap:
|
2017-03-17 08:05:57 +01:00
|
|
|
name: prometheus-config-reloader-example
|
2017-03-14 16:19:54 +01:00
|
|
|
containers:
|
|
|
|
- name: ubuntu
|
|
|
|
image: ubuntu
|
|
|
|
command: ["sleep", "3600"]
|
|
|
|
volumeMounts:
|
2017-03-15 14:14:03 +01:00
|
|
|
- name: rules
|
|
|
|
mountPath: /etc/prometheus/rules
|
2017-03-14 16:19:54 +01:00
|
|
|
readOnly: true
|
2017-03-17 08:05:57 +01:00
|
|
|
- name: prometheus-config-reloader
|
2018-03-22 15:59:22 +01:00
|
|
|
image: quay.io/coreos/prometheus-config-reloader:v0.0.4
|
2017-03-14 16:19:54 +01:00
|
|
|
args:
|
2017-03-15 14:14:03 +01:00
|
|
|
- '-config-volume-dir=/etc/prometheus/config'
|
|
|
|
- '-rule-volume-dir=/etc/prometheus/rules'
|
|
|
|
- '-reload-url=http://localhost:9090/-/reload'
|
2017-03-14 16:19:54 +01:00
|
|
|
resources:
|
|
|
|
requests:
|
|
|
|
memory: "16Mi"
|
|
|
|
cpu: "50m"
|
|
|
|
limits:
|
|
|
|
memory: "32Mi"
|
|
|
|
cpu: "100m"
|
|
|
|
volumeMounts:
|
2017-03-15 14:14:03 +01:00
|
|
|
- name: config
|
|
|
|
readOnly: true
|
|
|
|
mountPath: /etc/prometheus/config
|
|
|
|
- name: rules
|
|
|
|
mountPath: /etc/prometheus/rules
|
2017-03-14 16:19:54 +01:00
|
|
|
|