From 1ce64fef9d146c8c48cb80209836f077365f8af3 Mon Sep 17 00:00:00 2001
From: Sheogorath <sheogorath@shivering-isles.com>
Date: Wed, 18 Aug 2021 19:04:26 +0200
Subject: [PATCH] feat(postgres): Avoid a postgres cluster on a single node

This patch makes sure that a PostgreSQL cluster doesn't end up on a single
node. This is done by defaulting to a pod anti-affinity based on the
kubernetes hostname label, that should make sure, that all stateful sets
are distributed properly.
---
 infrastructure/postgres/release.yaml | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/infrastructure/postgres/release.yaml b/infrastructure/postgres/release.yaml
index 64dc5f961..e62ff6c15 100644
--- a/infrastructure/postgres/release.yaml
+++ b/infrastructure/postgres/release.yaml
@@ -24,3 +24,5 @@ spec:
       runAsUser: null
       readOnlyRootFilesystem: true
       allowPrivilegeEscalation: false
+    configKubernetes:
+      enable_pod_antiaffinity: true
-- 
GitLab