From e655a4f7614ed1803dda533fa7e1ef16a8fbefdf Mon Sep 17 00:00:00 2001 From: Joakim Olsson Date: Thu, 25 Apr 2024 13:54:32 +0200 Subject: [PATCH] feat(db): update postgres configuration Increase memory limits and adjust postgres image version. Add Swedish locale settings and create a new database for supplier. --- postgres.yaml | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/postgres.yaml b/postgres.yaml index a3581b4..f8de69a 100644 --- a/postgres.yaml +++ b/postgres.yaml @@ -26,6 +26,7 @@ data: CREATE DATABASE invoice WITH OWNER postgres ENCODING utf8; CREATE DATABASE notification WITH OWNER postgres ENCODING utf8; CREATE DATABASE salary WITH OWNER postgres ENCODING utf8; + CREATE DATABASE supplier WITH OWNER postgres ENCODING utf8; CREATE DATABASE time WITH OWNER postgres ENCODING utf8; CREATE DATABASE dancefinder WITH OWNER postgres ENCODING utf8; CREATE DATABASE hifi WITH OWNER postgres ENCODING utf8; @@ -47,13 +48,18 @@ spec: spec: containers: - name: postgres - image: argoyle/postgres-sv_se:15 + image: postgres:16-alpine + args: + - -c + - shared_buffers=384MB + - -c + - max_connections=300 imagePullPolicy: "IfNotPresent" resources: requests: - memory: 200Mi + memory: 400Mi limits: - memory: 300Mi + memory: 600Mi ports: - containerPort: 5432 env: @@ -63,6 +69,10 @@ spec: value: postgres - name: POSTGRES_PASSWORD value: postgres + - name: LANG + value: sv_SE.utf8 + - name: POSTGRES_INITDB_ARGS + value: --locale-provider=icu --icu-locale=sv-SE volumeMounts: - name: data mountPath: /var/lib/postgresql/data