restic-exporter: Deploy Restic Prometheus exporter

The [restic-exporter][0] exposes metrics about Restic snapshots as
Prometheus metrics.  This allows us to get similar data as we have for
BURP backups.  Chiefly important among the metrics are last backup time
and size, which we can use to determine if backups are working
correctly.

[0]: https://github.com/ngosang/restic-exporter
This commit is contained in:
2024-06-22 19:58:23 -05:00
parent ebcf9e3d42
commit 5079599423
7 changed files with 189 additions and 0 deletions

View File

@@ -0,0 +1,39 @@
apiVersion: networking.k8s.io/v1
kind: NetworkPolicy
metadata:
name: restic-exporter
labels:
app.kubernetes.io/name: restic-exporter
app.kubernetes.io/component: restic-exporter
spec:
egress:
- to:
- namespaceSelector:
matchLabels:
kubernetes.io/metadata.name: kube-system
podSelector:
matchLabels:
k8s-app: kube-dns
ports:
- port: 53
protocol: UDP
- port: 53
protocol: TCP
- to:
- ipBlock:
cidr: 172.30.0.30/32
ports:
- port: 9000
ingress:
- from:
- namespaceSelector:
matchLabels:
kubernetes.io/metadata.name: victoria-metrics
podSelector:
matchLabels:
app.kubernetes.io/name: vmagent
ports:
- port: metrics
podSelector:
matchLabels:
app.kubernetes.io/component: restic-exporter