From a76cfca7f29c20d659846bf050958405d5dc31e8 Mon Sep 17 00:00:00 2001 From: Erki Aas Date: Wed, 4 Oct 2023 20:46:25 +0300 Subject: [PATCH] monitoring: add ping-exporter --- monitoring/ping-exporter.yaml | 71 +++++++++++++++++++++++++++++++++++ 1 file changed, 71 insertions(+) create mode 100644 monitoring/ping-exporter.yaml diff --git a/monitoring/ping-exporter.yaml b/monitoring/ping-exporter.yaml new file mode 100644 index 0000000..6856752 --- /dev/null +++ b/monitoring/ping-exporter.yaml @@ -0,0 +1,71 @@ +--- +apiVersion: monitoring.coreos.com/v1 +kind: Probe +metadata: + name: ping-plotter +spec: + prober: + path: /metrics + url: ping-exporter + targets: + staticConfig: + static: + - 1.1.1.1 +--- +apiVersion: apps/v1 +kind: Deployment +metadata: + name: ping-exporter +spec: + revisionHistoryLimit: 0 + replicas: 1 + selector: + matchLabels: + app: ping-exporter + template: + metadata: + labels: + app: ping-exporter + spec: + containers: + - name: ping-exporter + image: czerwonk/ping_exporter + args: + - ./ping_exporter + - '1.1.1.1' + securityContext: + capabilities: + add: + - NET_ADMIN + - NET_RAW + nodeSelector: + dedicated: monitoring + tolerations: + - key: dedicated + operator: Equal + value: monitoring + effect: NoSchedule + affinity: + podAntiAffinity: + requiredDuringSchedulingIgnoredDuringExecution: + - labelSelector: + matchExpressions: + - key: app + operator: In + values: + - ping-exporter + topologyKey: "kubernetes.io/hostname" +--- +kind: Service +apiVersion: v1 +metadata: + name: ping-exporter +spec: + type: ClusterIP + ports: + - name: http + port: 80 + protocol: TCP + targetPort: 9427 + selector: + app: ping-exporter