forked from hswaw/hscloud
app/matrix: enable wal=logical for postgres, add tmp mount
This is quite hacky, but we intend to remove that postgres soon anyway. The changes to synapse's resource limits are to reflect current state of prod. Change-Id: Ic7beaa3e7ee378c0e10ba24f9a5a3aee67c2ccf2 Reviewed-on: https://gerrit.hackerspace.pl/c/hscloud/+/1468 Reviewed-by: q3k <q3k@hackerspace.pl>master
parent
0156ab24ca
commit
45394bf3b0
|
@ -242,6 +242,7 @@ local coturn = import "./coturn.libsonnet";
|
||||||
opts: {
|
opts: {
|
||||||
max_connections: "300",
|
max_connections: "300",
|
||||||
shared_buffers: "80MB",
|
shared_buffers: "80MB",
|
||||||
|
wal_level: "logical",
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
|
|
@ -1,6 +1,7 @@
|
||||||
local matrix = import "lib/matrix-ng.libsonnet";
|
local matrix = import "lib/matrix-ng.libsonnet";
|
||||||
local irc = import "lib/appservice-irc.libsonnet";
|
local irc = import "lib/appservice-irc.libsonnet";
|
||||||
local telegram = import "lib/appservice-telegram.libsonnet";
|
local telegram = import "lib/appservice-telegram.libsonnet";
|
||||||
|
local kube = import "../../kube/kube.libsonnet";
|
||||||
|
|
||||||
matrix {
|
matrix {
|
||||||
local app = self,
|
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
|
// Bump up storage to 200Gi from default 100Gi, use different name. The
|
||||||
// new name corresponds to a manually migrated and sized-up PVC that
|
// new name corresponds to a manually migrated and sized-up PVC that
|
||||||
// contains data from the original waw3-postgres PVC.
|
// contains data from the original waw3-postgres PVC.
|
||||||
postgres3+: {
|
postgres3+: {
|
||||||
|
local psql = self,
|
||||||
volumeClaim+: {
|
volumeClaim+: {
|
||||||
metadata+: {
|
metadata+: {
|
||||||
name: "waw3-postgres-2",
|
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: {
|
appservices: {
|
||||||
|
|
Loading…
Reference in New Issue