130 lines
3.0 KiB
YAML
130 lines
3.0 KiB
YAML
apiVersion: apps/v1
|
|
kind: Deployment
|
|
metadata:
|
|
labels:
|
|
run: blackbox-exporter
|
|
name: blackbox-exporter
|
|
namespace: monitoring
|
|
spec:
|
|
replicas: 1
|
|
selector:
|
|
matchLabels:
|
|
run: blackbox-exporter
|
|
template:
|
|
metadata:
|
|
labels:
|
|
run: blackbox-exporter
|
|
spec:
|
|
containers:
|
|
- image: prom/blackbox-exporter:master
|
|
name: blackbox-exporter
|
|
volumeMounts:
|
|
- mountPath: /etc/blackbox_exporter
|
|
name: blackbox-exporter
|
|
readOnly: true
|
|
restartPolicy: Always
|
|
volumes:
|
|
- name: blackbox-exporter
|
|
persistentVolumeClaim:
|
|
claimName: blackbox-exporter
|
|
|
|
---
|
|
apiVersion: apps/v1
|
|
kind: Deployment
|
|
metadata:
|
|
labels:
|
|
run: grafana
|
|
name: grafana
|
|
namespace: monitoring
|
|
spec:
|
|
replicas: 1
|
|
selector:
|
|
matchLabels:
|
|
run: grafana
|
|
template:
|
|
metadata:
|
|
labels:
|
|
run: grafana
|
|
spec:
|
|
initContainers:
|
|
- name: volume-mount-hack
|
|
image: busybox:1.28
|
|
command: ["sh", "-c", "chown -R 472:472 /etc/grafana && chown -R 472:472 /var/lib/grafana"]
|
|
volumeMounts:
|
|
- mountPath: /var/lib/grafana
|
|
readOnly: false
|
|
name: grafana-data
|
|
- mountPath: /etc/grafana
|
|
readOnly: false
|
|
name: grafana-conf
|
|
volumes:
|
|
- name: grafana-data
|
|
persistentVolumeClaim:
|
|
claimName: grafana-data
|
|
- name: grafana-conf
|
|
persistentVolumeClaim:
|
|
claimName: grafana-conf
|
|
|
|
containers:
|
|
- image: grafana/grafana
|
|
name: grafana
|
|
volumeMounts:
|
|
- mountPath: /var/lib/grafana
|
|
readOnly: false
|
|
name: grafana-data
|
|
- mountPath: /etc/grafana
|
|
readOnly: false
|
|
name: grafana-conf
|
|
restartPolicy: Always
|
|
volumes:
|
|
- name: grafana-data
|
|
persistentVolumeClaim:
|
|
claimName: grafana-data
|
|
- name: grafana-conf
|
|
persistentVolumeClaim:
|
|
claimName: grafana-conf
|
|
|
|
---
|
|
apiVersion: apps/v1
|
|
kind: Deployment
|
|
metadata:
|
|
labels:
|
|
run: prometheus
|
|
name: prometheus
|
|
namespace: monitoring
|
|
spec:
|
|
replicas: 1
|
|
selector:
|
|
matchLabels:
|
|
run: prometheus
|
|
template:
|
|
metadata:
|
|
labels:
|
|
run: prometheus
|
|
spec:
|
|
containers:
|
|
- args:
|
|
- --storage.tsdb.retention.time=1y
|
|
- --config.file=/etc/prometheus/prometheus.yml
|
|
image: prom/prometheus
|
|
name: prometheus
|
|
ports:
|
|
- containerPort: 9090
|
|
volumeMounts:
|
|
- mountPath: /etc/prometheus
|
|
readOnly: true
|
|
name: prometheus
|
|
- mountPath: /prometheus/data
|
|
readOnly: false
|
|
name: prometheus-data
|
|
restartPolicy: Always
|
|
volumes:
|
|
- name: prometheus
|
|
persistentVolumeClaim:
|
|
claimName: prometheus
|
|
- name: prometheus-data
|
|
persistentVolumeClaim:
|
|
claimName: prometheus-data
|
|
|
|
|