monitoring: Move to topologySpreadConstraints

This commit is contained in:
2024-08-21 07:11:06 +03:00
parent 3280b25a83
commit f1a2051838
6 changed files with 44 additions and 30 deletions

View File

@@ -45,16 +45,13 @@ spec:
operator: Equal
value: monitoring
effect: NoSchedule
affinity:
podAntiAffinity:
requiredDuringSchedulingIgnoredDuringExecution:
- labelSelector:
matchExpressions:
- key: app
operator: In
values:
- snmp-exporter
topologyKey: "kubernetes.io/hostname"
topologySpreadConstraints:
- maxSkew: 1
topologyKey: topology.kubernetes.io/zone
whenUnsatisfiable: DoNotSchedule
labelSelector:
matchLabels:
app: snmp-exporter
---
kind: Service
apiVersion: v1