-
Notifications
You must be signed in to change notification settings - Fork 18
/
ma1sd.yaml
122 lines (118 loc) · 2.43 KB
/
ma1sd.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
apiVersion: v1
data:
ma1sd.yaml: |
matrix:
domain: example.com
server:
name: matrix.example.com
port: 8090
publicUrl: https://matrix.example.com
key:
# Can be stored in the PVC as well, in which case it will be generated
path: /etc/ma1sd/signing.key
storage:
provider:
sqlite:
database: /var/lib/ma1sd/ma1sd.db
forward:
servers:
- matrix.org
dns:
overwrite:
homeserver:
client:
- name: matrix.example.com
value: 'http://matrix-synapse.matrix.svc:8008'
- name: example.com
value: 'http://matrix-synapse.matrix.svc:8008'
kind: ConfigMap
metadata:
labels:
app: ma1sd
name: ma1sd-config
namespace: matrix
---
# Ma1sd uses a signing key as well, while it's possible to reuse the Synapse key
# it's recommended to generate a specific one for ma1sd
kind: Secret
apiVersion: v1
metadata:
name: ma1sd-keys
data:
signing.key:
type: Opaque
---
apiVersion: v1
kind: Service
metadata:
labels:
app: ma1sd
name: ma1sd
namespace: matrix
spec:
ports:
- name: ma1sd
port: 8090
protocol: TCP
targetPort: 8090
selector:
app: ma1sd
type: ClusterIP
---
# ma1sd stores its database in an sqlite file, which needs a PVC
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
name: ma1sd-data
namespace: matrix
spec:
accessModes:
- ReadWriteOnce
resources:
requests:
storage: 1Gi
---
apiVersion: apps/v1
kind: Deployment
metadata:
labels:
app: ma1sd
name: ma1sd
namespace: matrix
spec:
replicas: 1
selector:
matchLabels:
app: ma1sd
template:
metadata:
labels:
app: ma1sd
spec:
containers:
- image: ma1uta/ma1sd:2.2.2
imagePullPolicy: IfNotPresent
name: ma1sd
readinessProbe:
tcpSocket:
port: 8090
volumeMounts:
- mountPath: /var/lib/ma1sd
name: ma1sd-data
- mountPath: /etc/ma1sd/signing.key
name: matrix-synapse-keys
subPath: signing.key
- mountPath: /etc/ma1sd/ma1sd.yaml
name: ma1sd-config
subPath: ma1sd.yaml
restartPolicy: Always
volumes:
- name: ma1sd-data
persistentVolumeClaim:
claimName: ma1sd-data
- name: ma1sd-keys
secret:
secretName: ma1sd-keys
- configMap:
name: ma1sd-config
name: ma1sd-config