K3s-cluster/synapse/deployment.yaml
Tanguy Herbron 20f32fd24b feat(synapse): Add basic Matrix configuration
Added different manifests for deployment, routing, backups and configuration around Synapse server for Matrix.
2022-09-24 01:03:07 +02:00

58 lines
1.9 KiB
YAML

apiVersion: apps/v1
kind: Deployment
metadata:
name: synapse
namespace: synapse
spec:
replicas: 1
selector:
matchLabels:
app: synapse
template:
metadata:
labels:
app: synapse
spec:
nodeName: slave-1
securityContext:
fsGroup: 991
containers:
- name: synapse
image: matrixdotorg/synapse:latest
ports:
- containerPort: 8008
- containerPort: 9009
volumeMounts:
- mountPath: "/data"
name: synapse-data-pv
- mountPath: "/data/homeserver.yaml"
name: synapse-config-volume
subPath: homeserver.yaml
- mountPath: "/data/matrix.beta.halia.dev.log.config"
name: synapse-config-volume
subPath: matrix.beta.halia.dev.log.config
- name: synapse-db
image: postgres:14-alpine3.15
env:
- name: POSTGRES_DB
value: "synapse"
- name: POSTGRES_USER
value: "synapse"
- name: POSTGRES_PASSWORD
value: "aberation"
- name: POSTGRES_INITDB_ARGS
value: "--encoding=UTF8 --locale=C"
volumeMounts:
- mountPath: "/var/lib/postgresql/data"
name: synapse-db-pv
volumes:
- name: synapse-db-pv
hostPath:
path: "/mnt/synapse/db"
- name: synapse-data-pv
hostPath:
path: "/mnt/synapse/data"
- name: synapse-config-volume
configMap:
name: synapse-config