Skip to content
Snippets Groups Projects
Verified Commit 2cd735ad authored by Sheogorath's avatar Sheogorath :european_castle:
Browse files

feat(mastodon): Add Pod-Anti-Affinity to improve HA setup

This patch uses pod anti-affinity to spread the mastodon pods throughout the
cluster this should ensure that a single node failure doesn't take down the
entire thing.

Adding PDBs will be done down the line.
parent cb1f2565
Branches
Tags
No related merge requests found
...@@ -73,12 +73,27 @@ spec: ...@@ -73,12 +73,27 @@ spec:
name: mastodon-streaming name: mastodon-streaming
spec: spec:
replicas: 2 replicas: 2
affinity:
podAntiAffinity:
requiredDuringSchedulingIgnoredDuringExecution:
- labelSelector:
matchLabels:
app.kubernetes.io/component: streaming
topologyKey: kubernetes.io/hostname
- kind: Deployment - kind: Deployment
apiVersion: apps/v1 apiVersion: apps/v1
metadata: metadata:
name: mastodon-web name: mastodon-web
spec: spec:
replicas: 2 replicas: 2
affinity:
podAntiAffinity:
requiredDuringSchedulingIgnoredDuringExecution:
- labelSelector:
matchLabels:
app.kubernetes.io/component: web
app.kubernetes.io/part-of: rails
topologyKey: kubernetes.io/hostname
- kind: ConfigMap - kind: ConfigMap
apiVersion: v1 apiVersion: v1
metadata: metadata:
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment