From 24995c3a050c9fb56b9e36a750e72a620809d3a3 Mon Sep 17 00:00:00 2001 From: Tanguy Herbron Date: Sat, 20 Jan 2024 00:36:19 +0100 Subject: [PATCH] feat: HA and move PVC to redundant storage class --- manifests/database.yaml | 4 ++-- manifests/deployment.yaml | 9 ++++++++- manifests/pvc.yaml | 4 ++-- 3 files changed, 12 insertions(+), 5 deletions(-) diff --git a/manifests/database.yaml b/manifests/database.yaml index f741207..46c75a9 100644 --- a/manifests/database.yaml +++ b/manifests/database.yaml @@ -5,11 +5,11 @@ metadata: namespace: synapse spec: - instances: 1 + instances: 3 storage: size: 5Gi - storageClass: flat-storage-class + storageClass: redundant-storage-class bootstrap: initdb: diff --git a/manifests/deployment.yaml b/manifests/deployment.yaml index 78f4cf1..98a2e1e 100644 --- a/manifests/deployment.yaml +++ b/manifests/deployment.yaml @@ -4,7 +4,7 @@ metadata: name: synapse namespace: synapse spec: - replicas: 1 + replicas: 2 selector: matchLabels: app: synapse @@ -13,6 +13,13 @@ spec: labels: app: synapse spec: + topologySpreadConstraints: + - maxSkrew: 1 + topologyKey: kubernetes.io/hostname + whenUnsatisfiable: DoNotSchedule + labelSelector: + matchLabels: + app: synapse securityContext: fsGroup: 991 containers: diff --git a/manifests/pvc.yaml b/manifests/pvc.yaml index 0a50fa7..fe395ca 100644 --- a/manifests/pvc.yaml +++ b/manifests/pvc.yaml @@ -5,8 +5,8 @@ metadata: namespace: synapse spec: accessModes: - - ReadWriteOnce - storageClassName: flat-storage-class + - ReadWriteMany + storageClassName: redundant-storage-class resources: requests: storage: 1Gi