edb8f63848
This commit adds a manifest for deploying a WireGuard prometheus exporter, Role and RoleBinding for kube-prometheus to monitor the Kilo namespace and a new guide in the docs about how to monitor Kilo. Signed-off-by: leonnicolas <leonloechner@gmx.de>
68 lines
1.5 KiB
YAML
68 lines
1.5 KiB
YAML
apiVersion: monitoring.coreos.com/v1
|
|
kind: PodMonitor
|
|
metadata:
|
|
labels:
|
|
app.kubernetes.io/name: wg-exporter
|
|
app.kubernetes.io/part-of: kilo
|
|
name: wg-exporter
|
|
namespace: kilo
|
|
spec:
|
|
namespaceSelector:
|
|
matchNames:
|
|
- kilo
|
|
podMetricsEndpoints:
|
|
- interval: 15s
|
|
port: metrics
|
|
path: /metrics
|
|
selector:
|
|
matchLabels:
|
|
app.kubernetes.io/part-of: kilo
|
|
app.kubernetes.io/name: wg-exporter
|
|
---
|
|
apiVersion: apps/v1
|
|
kind: DaemonSet
|
|
metadata:
|
|
labels:
|
|
app.kubernetes.io/name: wg-exporter
|
|
app.kubernetes.io/part-of: kilo
|
|
name: wg-exporter
|
|
namespace: kilo
|
|
spec:
|
|
selector:
|
|
matchLabels:
|
|
app.kubernetes.io/name: wg-exporter
|
|
app.kubernetes.io/part-of: kilo
|
|
template:
|
|
metadata:
|
|
labels:
|
|
app.kubernetes.io/name: wg-exporter
|
|
app.kubernetes.io/part-of: kilo
|
|
spec:
|
|
containers:
|
|
- args:
|
|
- -a
|
|
- -i=kilo0
|
|
- -p=9586
|
|
image: mindflavor/prometheus-wireguard-exporter
|
|
name: wg-exporter
|
|
ports:
|
|
- containerPort: 9586
|
|
name: metrics
|
|
protocol: TCP
|
|
securityContext:
|
|
privileged: true
|
|
terminationMessagePath: /dev/termination-log
|
|
terminationMessagePolicy: File
|
|
volumeMounts:
|
|
- name: wireguard
|
|
mountPath: /var/run/wireguard
|
|
volumes:
|
|
- name: wireguard
|
|
hostPath:
|
|
path: /var/run/wireguard
|
|
tolerations:
|
|
- effect: NoSchedule
|
|
operator: Exists
|
|
- effect: NoExecute
|
|
operator: Exists
|