From 18c4764687ae33f31b41b7eb84942ccdea7f50af Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lauri=20V=C3=B5sandi?= Date: Sat, 12 Nov 2022 16:50:31 +0200 Subject: [PATCH] prometheus-exporter: Fix antiaffinity rule for Mikrotik exporter --- prometheus-operator/mikrotik-exporter.yml | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/prometheus-operator/mikrotik-exporter.yml b/prometheus-operator/mikrotik-exporter.yml index c04bd84..9708022 100644 --- a/prometheus-operator/mikrotik-exporter.yml +++ b/prometheus-operator/mikrotik-exporter.yml @@ -87,7 +87,13 @@ spec: affinity: podAntiAffinity: requiredDuringSchedulingIgnoredDuringExecution: - - topologyKey: "kubernetes.io/hostname" + - labelSelector: + matchExpressions: + - key: app + operator: In + values: + - mikrotik-exporter + topologyKey: "kubernetes.io/hostname" --- kind: Service apiVersion: v1