forked from hswaw/hscloud
app/matrix: migrate postgres and data to waw3
The way this was migrated is not to be spoken of. (hint: it involved downtime, and mounting two volumes at once) appservice-irc has some storage, we should migrate that to waw3, too. But it's not as critical. The new storage (waw3) is _much_ faster. Change-Id: I4b4bd32e4fedc514753d25bac35d001e8a9c5f00
This commit is contained in:
parent
35d437883b
commit
c0c037aad9
3 changed files with 12 additions and 6 deletions
|
@ -31,7 +31,7 @@ database:
|
|||
user: "synapse"
|
||||
password: "{{ POSTGRES_PASSWORD }}"
|
||||
database: "synapse"
|
||||
host: "postgres"
|
||||
host: "waw3-postgres"
|
||||
port: "5432"
|
||||
cp_min: 5
|
||||
cp_max: 10
|
||||
|
|
|
@ -15,6 +15,7 @@ local postgres = import "../../kube/postgres.libsonnet";
|
|||
domain: "matrix.hackerspace.pl",
|
||||
serverName: "hackerspace.pl",
|
||||
storageClassName: "waw-hdd-paranoid-2",
|
||||
storageClassName3: "waw-hdd-redundant-3",
|
||||
|
||||
synapseImage: "matrixdotorg/synapse:v1.17.0",
|
||||
riotImage: "vectorim/riot-web:v1.7.1",
|
||||
|
@ -33,21 +34,23 @@ local postgres = import "../../kube/postgres.libsonnet";
|
|||
|
||||
namespace: kube.Namespace(cfg.namespace),
|
||||
|
||||
postgres: postgres {
|
||||
postgres3: postgres {
|
||||
cfg+: {
|
||||
namespace: cfg.namespace,
|
||||
appName: "synapse",
|
||||
database: "synapse",
|
||||
username: "synapse",
|
||||
prefix: "waw3-",
|
||||
password: { secretKeyRef: { name: "synapse", key: "postgres_password" } },
|
||||
storageClassName: cfg.storageClassName,
|
||||
storageClassName: cfg.storageClassName3,
|
||||
storageSize: "100Gi",
|
||||
},
|
||||
},
|
||||
|
||||
dataVolume: kube.PersistentVolumeClaim("synapse-data") {
|
||||
dataVolume: kube.PersistentVolumeClaim("synapse-data-waw3") {
|
||||
metadata+: app.metadata("synapse-data"),
|
||||
spec+: {
|
||||
storageClassName: cfg.storageClassName,
|
||||
storageClassName: cfg.storageClassName3,
|
||||
accessModes: [ "ReadWriteOnce" ],
|
||||
resources: {
|
||||
requests: {
|
||||
|
|
|
@ -16,6 +16,8 @@ local kube = import "kube.libsonnet";
|
|||
username: error "username must be set",
|
||||
# not literal, instead ref for env (like { secretKeyRef: ... })
|
||||
password: error "password must be set",
|
||||
|
||||
storageSize: "30Gi",
|
||||
},
|
||||
|
||||
makeName(suffix):: cfg.prefix + suffix,
|
||||
|
@ -36,7 +38,7 @@ local kube = import "kube.libsonnet";
|
|||
accessModes: [ "ReadWriteOnce" ],
|
||||
resources: {
|
||||
requests: {
|
||||
storage: "30Gi",
|
||||
storage: cfg.storageSize,
|
||||
},
|
||||
},
|
||||
},
|
||||
|
@ -74,6 +76,7 @@ local kube = import "kube.libsonnet";
|
|||
},
|
||||
},
|
||||
},
|
||||
|
||||
svc: kube.Service(postgres.makeName("postgres")) {
|
||||
metadata+: postgres.metadata,
|
||||
target_pod:: postgres.deployment.spec.template,
|
||||
|
|
Loading…
Reference in a new issue