add matrix server
This commit is contained in:
parent
f604c7ae84
commit
89c5a0df8d
30
matrix/db.yaml
Normal file
30
matrix/db.yaml
Normal file
|
@ -0,0 +1,30 @@
|
||||||
|
apiVersion: postgres-operator.crunchydata.com/v1beta1
|
||||||
|
kind: PostgresCluster
|
||||||
|
metadata:
|
||||||
|
name: synapse-werts-db
|
||||||
|
namespace: synapse
|
||||||
|
spec:
|
||||||
|
image: registry.developers.crunchydata.com/crunchydata/crunchy-postgres:ubi8-14.6-2
|
||||||
|
postgresVersion: 14
|
||||||
|
instances:
|
||||||
|
- replicas: 1
|
||||||
|
dataVolumeClaimSpec:
|
||||||
|
accessModes:
|
||||||
|
- "ReadWriteOnce"
|
||||||
|
resources:
|
||||||
|
requests:
|
||||||
|
storage: 50Gi
|
||||||
|
storageClassName: ssd
|
||||||
|
backups:
|
||||||
|
pgbackrest:
|
||||||
|
image: registry.developers.crunchydata.com/crunchydata/crunchy-pgbackrest:ubi8-2.41-2
|
||||||
|
repos:
|
||||||
|
- name: repo1
|
||||||
|
volume:
|
||||||
|
volumeClaimSpec:
|
||||||
|
accessModes:
|
||||||
|
- "ReadWriteMany"
|
||||||
|
resources:
|
||||||
|
requests:
|
||||||
|
storage: 100Gi
|
||||||
|
storageClassName: nfs
|
62
matrix/deployment.yaml
Normal file
62
matrix/deployment.yaml
Normal file
|
@ -0,0 +1,62 @@
|
||||||
|
apiVersion: apps/v1
|
||||||
|
kind: Deployment
|
||||||
|
metadata:
|
||||||
|
name: synapse-werts
|
||||||
|
namespace: synapse
|
||||||
|
annotations:
|
||||||
|
reloader.stakater.com/auto: "true"
|
||||||
|
spec:
|
||||||
|
replicas: 1
|
||||||
|
selector:
|
||||||
|
matchLabels:
|
||||||
|
app: synapse-werts
|
||||||
|
strategy:
|
||||||
|
rollingUpdate:
|
||||||
|
maxSurge: 1
|
||||||
|
maxUnavailable: 1
|
||||||
|
type: RollingUpdate
|
||||||
|
template:
|
||||||
|
metadata:
|
||||||
|
labels:
|
||||||
|
app: synapse-werts
|
||||||
|
spec:
|
||||||
|
containers:
|
||||||
|
- env:
|
||||||
|
- name: SYNAPSE_CONFIG_PATH
|
||||||
|
value: /config/homeserver.yaml
|
||||||
|
image: matrixdotorg/synapse:v1.71.0
|
||||||
|
imagePullPolicy: IfNotPresent
|
||||||
|
name: synapse
|
||||||
|
ports:
|
||||||
|
- containerPort: 8008
|
||||||
|
protocol: TCP
|
||||||
|
resources: {}
|
||||||
|
terminationMessagePath: /dev/termination-log
|
||||||
|
terminationMessagePolicy: File
|
||||||
|
volumeMounts:
|
||||||
|
- mountPath: /data
|
||||||
|
name: data-pv
|
||||||
|
- mountPath: /config
|
||||||
|
name: config
|
||||||
|
readOnly: true
|
||||||
|
dnsPolicy: ClusterFirst
|
||||||
|
initContainers: []
|
||||||
|
#- name: sleeper
|
||||||
|
# image: debian:11
|
||||||
|
# command: ["bash", "-c", "sleep 1000000"]
|
||||||
|
# volumeMounts:
|
||||||
|
# - mountPath: /data
|
||||||
|
# name: data-pv
|
||||||
|
restartPolicy: Always
|
||||||
|
schedulerName: default-scheduler
|
||||||
|
securityContext: {}
|
||||||
|
terminationGracePeriodSeconds: 30
|
||||||
|
volumes:
|
||||||
|
- name: data-pv
|
||||||
|
nfs:
|
||||||
|
path: /volume1/k8s-volumes/synapse-werts
|
||||||
|
server: 172.16.18.1
|
||||||
|
- name: config
|
||||||
|
secret:
|
||||||
|
secretName: synapse-werts-config
|
||||||
|
|
19
matrix/init.sql
Normal file
19
matrix/init.sql
Normal file
|
@ -0,0 +1,19 @@
|
||||||
|
-- Database: synapse-werts
|
||||||
|
|
||||||
|
-- DROP DATABASE IF EXISTS "synapse-werts";
|
||||||
|
|
||||||
|
CREATE DATABASE "synapse-werts"
|
||||||
|
WITH
|
||||||
|
OWNER = postgres
|
||||||
|
ENCODING = 'UTF8'
|
||||||
|
LC_COLLATE = 'C'
|
||||||
|
LC_CTYPE = 'C'
|
||||||
|
TABLESPACE = pg_default
|
||||||
|
CONNECTION LIMIT = -1
|
||||||
|
IS_TEMPLATE = False;
|
||||||
|
|
||||||
|
GRANT TEMPORARY, CONNECT ON DATABASE "synapse-werts" TO PUBLIC;
|
||||||
|
|
||||||
|
GRANT ALL ON DATABASE "synapse-werts" TO postgres;
|
||||||
|
|
||||||
|
GRANT ALL ON DATABASE "synapse-werts" TO "synapse-werts";
|
4
matrix/ns.yaml
Normal file
4
matrix/ns.yaml
Normal file
|
@ -0,0 +1,4 @@
|
||||||
|
apiVersion: v1
|
||||||
|
kind: Namespace
|
||||||
|
metadata:
|
||||||
|
name: synapse
|
16
matrix/service.yaml
Normal file
16
matrix/service.yaml
Normal file
|
@ -0,0 +1,16 @@
|
||||||
|
apiVersion: v1
|
||||||
|
kind: Service
|
||||||
|
metadata:
|
||||||
|
labels:
|
||||||
|
app: synapse-werts
|
||||||
|
name: synapse-werts
|
||||||
|
namespace: synapse
|
||||||
|
spec:
|
||||||
|
ports:
|
||||||
|
- port: 8008
|
||||||
|
name: http
|
||||||
|
protocol: TCP
|
||||||
|
targetPort: 8008
|
||||||
|
selector:
|
||||||
|
app: synapse-werts
|
||||||
|
type: ClusterIP
|
Loading…
Reference in New Issue
Block a user