1
0
Fork 0

v-m: vmstorage: Add pod anti-affinity

One of the reasons for moving to 4 `vmstorage` replicas was to ensure
that the load was spread evenly between the physical VM host machines.
To ensure that is the case as much as possible, we need to keep one
pod per Kubernetes node.
etcd
Dustin 2024-06-26 18:23:15 -05:00
parent f7f408ca8c
commit 2d7fec1cdf
1 changed files with 12 additions and 0 deletions

View File

@ -36,6 +36,18 @@ spec:
app.kubernetes.io/name: vmstorage
app.kubernetes.io/component: vmstorage
spec:
affinity:
podAntiAffinity:
preferredDuringSchedulingIgnoredDuringExecution:
- podAffinityTerm:
labelSelector:
matchExpressions:
- key: app.kubernetes.io/name
operator: In
values:
- vmstorage
topologyKey: kubernetes.io/hostname
weight: 1
containers:
- name: vmstorage
image: docker.io/victoriametrics/vmstorage:v1.96.0-cluster