From 73ccafab6840b605484f474c0021e9a4672d7318 Mon Sep 17 00:00:00 2001 From: Joakim Olsson Date: Sat, 18 Apr 2026 16:34:17 +0000 Subject: [PATCH] fix(postgres): remove memory limit and add document database (#259) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ## Summary - Remove the 600Mi memory limit on the local Postgres Deployment. With `shared_buffers=384MB` + `max_connections=300` the pod was being repeatedly OOMKilled under real workloads, leaving clients with intermittent `connect: connection refused`. Keep the 400Mi request for scheduling. - Add `document` to the seeded database list in `initdb.sh`. ## Test plan - [x] `kubectl --context kind-unbound apply -f k8s/infra/postgres.yaml` — rollout succeeds - [x] Postgres pod stable (0 restarts) after apply - [ ] On a fresh cluster (`./setup`), verify the `document` database is created (requires empty `data/postgres/`) Reviewed-on: https://gitea.unbound.se/unboundsoftware/local-k8s/pulls/259 --- k8s/infra/postgres.yaml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/k8s/infra/postgres.yaml b/k8s/infra/postgres.yaml index 3004f75..786c3d0 100644 --- a/k8s/infra/postgres.yaml +++ b/k8s/infra/postgres.yaml @@ -23,6 +23,7 @@ data: CREATE DATABASE authz WITH OWNER postgres ENCODING utf8; CREATE DATABASE company WITH OWNER postgres ENCODING utf8; CREATE DATABASE consumer WITH OWNER postgres ENCODING utf8; + CREATE DATABASE document WITH OWNER postgres ENCODING utf8; CREATE DATABASE employee WITH OWNER postgres ENCODING utf8; CREATE DATABASE invoice WITH OWNER postgres ENCODING utf8; CREATE DATABASE notification WITH OWNER postgres ENCODING utf8; @@ -62,8 +63,6 @@ spec: resources: requests: memory: 400Mi - limits: - memory: 600Mi ports: - containerPort: 5432 env: