1
0
forked from k-space/kube

wildduck: Make sure Haraka, Wildduck and ZoneMTA are scheduled on same hosts for MetalLB

This commit is contained in:
Lauri Võsandi 2023-09-17 10:21:47 +03:00
parent 13a2430e9d
commit 3f5b90a546
3 changed files with 71 additions and 3 deletions

View File

@ -105,7 +105,7 @@ kind: Deployment
metadata:
name: haraka
spec:
replicas: 4
replicas: 2
selector:
matchLabels:
app.kubernetes.io/name: wildduck
@ -116,6 +116,33 @@ spec:
app.kubernetes.io/name: wildduck
app.kubernetes.io/component: haraka
spec:
affinity:
podAntiAffinity:
requiredDuringSchedulingIgnoredDuringExecution:
- labelSelector:
matchExpressions:
- key: app.kubernetes.io/name
operator: In
values:
- wildduck
- key: app.kubernetes.io/component
operator: In
values:
- haraka
topologyKey: topology.kubernetes.io/zone
podAffinity:
requiredDuringSchedulingIgnoredDuringExecution:
- labelSelector:
matchExpressions:
- key: app.kubernetes.io/name
operator: In
values:
- wildduck
- key: app.kubernetes.io/component
operator: In
values:
- wildduck
topologyKey: kubernetes.io/hostname
containers:
- name: haraka
image: docker.io/codemowers/wildduck-haraka-inbound:latest@sha256:a130cc6a60ab2a47cb5971355ed2474136254613b4b8bd30aeabc6e123695ea3

View File

@ -24,7 +24,7 @@ kind: Deployment
metadata:
name: wildduck
spec:
replicas: 4
replicas: 2
selector:
matchLabels:
app.kubernetes.io/name: wildduck
@ -35,6 +35,20 @@ spec:
app.kubernetes.io/name: wildduck
app.kubernetes.io/component: wildduck
spec:
affinity:
podAntiAffinity:
requiredDuringSchedulingIgnoredDuringExecution:
- labelSelector:
matchExpressions:
- key: app.kubernetes.io/name
operator: In
values:
- wildduck
- key: app.kubernetes.io/component
operator: In
values:
- wildduck
topologyKey: topology.kubernetes.io/zone
containers:
- name: wildduck
image: docker.io/nodemailer/wildduck

View File

@ -42,7 +42,7 @@ kind: Deployment
metadata:
name: zonemta
spec:
replicas: 4
replicas: 2
selector:
matchLabels:
app.kubernetes.io/name: wildduck
@ -53,6 +53,33 @@ spec:
app.kubernetes.io/name: wildduck
app.kubernetes.io/component: zonemta
spec:
affinity:
podAntiAffinity:
requiredDuringSchedulingIgnoredDuringExecution:
- labelSelector:
matchExpressions:
- key: app.kubernetes.io/name
operator: In
values:
- wildduck
- key: app.kubernetes.io/component
operator: In
values:
- zonemta
topologyKey: topology.kubernetes.io/zone
podAffinity:
requiredDuringSchedulingIgnoredDuringExecution:
- labelSelector:
matchExpressions:
- key: app.kubernetes.io/name
operator: In
values:
- wildduck
- key: app.kubernetes.io/component
operator: In
values:
- wildduck
topologyKey: kubernetes.io/hostname
containers:
- name: zonemta
image: docker.io/codemowers/wildduck-zonemta-outbound:latest@sha256:0878c803164e636820398f11a3811f3d92b7771c6202cfe229f97449d0009119