diff --git a/app/matrix/lib/matrix-ng.libsonnet b/app/matrix/lib/matrix-ng.libsonnet index ac895bc1..91c92d2f 100644 --- a/app/matrix/lib/matrix-ng.libsonnet +++ b/app/matrix/lib/matrix-ng.libsonnet @@ -242,6 +242,7 @@ local coturn = import "./coturn.libsonnet"; opts: { max_connections: "300", shared_buffers: "80MB", + wal_level: "logical", }, }, }, diff --git a/app/matrix/matrix.hackerspace.pl.jsonnet b/app/matrix/matrix.hackerspace.pl.jsonnet index 4199e0e4..931901a6 100644 --- a/app/matrix/matrix.hackerspace.pl.jsonnet +++ b/app/matrix/matrix.hackerspace.pl.jsonnet @@ -1,6 +1,7 @@ local matrix = import "lib/matrix-ng.libsonnet"; local irc = import "lib/appservice-irc.libsonnet"; local telegram = import "lib/appservice-telegram.libsonnet"; +local kube = import "../../kube/kube.libsonnet"; matrix { local app = self, @@ -77,12 +78,24 @@ matrix { }, }, }, + // local changes + main+: { + deployment+: { + cfg+: { + resources+: { + limits+: { cpu: "2", memory: "8Gi" }, + requests+: { cpu: "2", memory: "8Gi" }, + }, + }, + }, + }, }, // Bump up storage to 200Gi from default 100Gi, use different name. The // new name corresponds to a manually migrated and sized-up PVC that // contains data from the original waw3-postgres PVC. postgres3+: { + local psql = self, volumeClaim+: { metadata+: { name: "waw3-postgres-2", @@ -95,6 +108,36 @@ matrix { }, }, }, + tempVC: kube.PersistentVolumeClaim(psql.makeName("tempvc")) { + metadata+: psql.metadata, + spec+: { + storageClassName: psql.cfg.storageClassName, + accessModes: [ "ReadWriteOnce" ], + resources: { + requests: { + storage: "200Gi", + }, + }, + }, + }, + deployment+: { + spec+: { + template+: { + spec+: { + volumes_+: { + temp: kube.PersistentVolumeClaimVolume(psql.tempVC), + }, + containers_+: { + postgres+: { + volumeMounts_+: { + temp: { mountPath: "/mnt/tmp/" }, + }, + }, + }, + }, + }, + }, + }, }, appservices: {