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.
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user