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 name: drone
labels: labels:
app.kubernetes.io/name: drone app.kubernetes.io/name: drone
probe: blackbox
spec: spec:
rules: rules:
- host: ${DRONE_EXTERNAL_HOST} - host: ${DRONE_EXTERNAL_HOST}

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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