1
0
Fork 0

add blackbox-exporter

This commit is contained in:
Massaki Archambault 2021-09-06 13:24:55 -04:00
parent 0494ca1356
commit 74efc7f72c
13 changed files with 73 additions and 0 deletions

View File

@ -0,0 +1,40 @@
apiVersion: apps/v1
kind: Deployment
metadata:
name: blackbox-exporter
spec:
selector:
matchLabels:
app.kubernetes.io/name: blackbox-exporter
template:
metadata:
labels:
app.kubernetes.io/name: blackbox-exporter
spec:
containers:
- name: blackbox-exporter
image: prom/blackbox-exporter
resources:
requests:
memory: 128Mi
cpu: 500m
limits:
memory: 128Mi
cpu: 500m
ports:
- containerPort: 9115
name: http-metrics
---
apiVersion: v1
kind: Service
metadata:
name: blackbox-exporter
labels:
app.kubernetes.io/name: blackbox-exporter
spec:
selector:
app.kubernetes.io/name: blackbox-exporter
ports:
- name: http-metrics
port: 9115
targetPort: http-metrics

View File

@ -0,0 +1,18 @@
apiVersion: monitoring.coreos.com/v1
kind: Probe
metadata:
name: blackbox-exporter
labels:
app.kubernetes.io/name: blackbox-exporter
monitor: prometheus
spec:
module: http_2xx
prober:
url: blackbox-exporter.monitoring.svc:9115
targets:
ingress:
namespaceSelector:
any: true
selector:
matchLabels:
probe: blackbox

View File

@ -0,0 +1,3 @@
resources:
- blackbox-exporter-deployment.yaml
- blackbox-exporter-probe.yaml

View File

@ -4,6 +4,7 @@ metadata:
name: drone
labels:
app.kubernetes.io/name: drone
probe: blackbox
spec:
rules:
- host: ${DRONE_EXTERNAL_HOST}

View File

@ -4,6 +4,7 @@ metadata:
name: gitea
labels:
app.kubernetes.io/name: gitea
probe: blackbox
spec:
rules:
- host: ${GITEA_EXTERNAL_HOST}

View File

@ -4,6 +4,7 @@ metadata:
name: grafana
labels:
app.kubernetes.io/name: grafana
probe: blackbox
spec:
rules:
- host: ${GRAFANA_EXTERNAL_HOST}

View File

@ -4,6 +4,7 @@ metadata:
name: kubernetes-dashboard
labels:
app.kubernetes.io/name: kubernetes-dashboard
probe: blackbox
spec:
rules:
- host: ${KUBERNETES_DASHBOARD_EXTERNAL_HOST}

View File

@ -5,6 +5,7 @@ metadata:
namespace: longhorn-system
labels:
app.kubernetes.io/name: longhorn-ui
probe: blackbox
spec:
rules:
- host: ${LONGHORN_EXTERNAL_HOST}

View File

@ -4,6 +4,7 @@ metadata:
name: nextcloud
labels:
app.kubernetes.io/name: nextcloud
probe: blackbox
spec:
rules:
- host: ${NEXTCLOUD_EXTERNAL_HOST}

View File

@ -4,6 +4,7 @@ metadata:
name: prometheus
labels:
app.kubernetes.io/name: prometheus
probe: blackbox
spec:
rules:
- host: ${PROMETHEUS_EXTERNAL_HOST}

View File

@ -10,6 +10,9 @@ spec:
podMonitorSelector:
matchLabels:
monitor: prometheus
probeSelector:
matchLabels:
monitor: prometheus
resources:
requests:
cpu: 750m

View File

@ -4,6 +4,7 @@ metadata:
name: traefik
labels:
app.kubernetes.io/name: traefik
probe: blackbox
spec:
rules:
- host: ${TRAEFIK_EXTERNAL_HOST}

View File

@ -1,6 +1,7 @@
bases:
- ../../bases/prometheus
- ../../bases/node-exporter
- ../../bases/blackbox-exporter
- ../../bases/kube-state-metrics
resources: