Skip to content

Commit 3a7cc58

Browse files
committed
rabbitmq: ensure that pods are spread across multiple hosts
1 parent d25014d commit 3a7cc58

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

components/openstack/templates/openstack-cluster.yaml.tpl

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,21 @@ metadata:
99
spec:
1010
replicas: 3
1111
persistence: {{ .Values.rabbitmq.persistence | toJson }}
12+
affinity:
13+
nodeAffinity:
14+
requiredDuringSchedulingIgnoredDuringExecution:
15+
nodeSelectorTerms:
16+
- matchExpressions:
17+
- key: openstack-control-plane
18+
operator: In
19+
values:
20+
- enabled
21+
podAntiAffinity:
22+
requiredDuringSchedulingIgnoredDuringExecution:
23+
- labelSelector:
24+
matchLabels:
25+
app.kubernetes.io/name: rabbitmq
26+
topologyKey: kubernetes.io/hostname
1227
---
1328
apiVersion: policy/v1
1429
kind: PodDisruptionBudget

0 commit comments

Comments
 (0)