-
Notifications
You must be signed in to change notification settings - Fork 18
/
federation-reader.yaml
115 lines (110 loc) · 2.72 KB
/
federation-reader.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
# Example ingress rules are in the ingress.yaml file
---
apiVersion: v1
data:
federation-reader.worker: |
worker_app: synapse.app.federation_reader
# The replication listener on the synapse to talk to.
worker_replication_host: matrix-synapse-replication
worker_replication_port: 9092
worker_listeners:
- type: http
port: 8083
resources:
- names:
- federation
worker_log_config: /synapse/config/log.yaml
homeserver.yaml: |
# ...
kind: ConfigMap
metadata:
name: matrix-synapse
namespace: matrix
---
apiVersion: v1
kind: Service
metadata:
name: federation-reader
namespace: matrix
spec:
ports:
- name: http
port: 8083
protocol: TCP
targetPort: 8083
selector:
app: matrix-synapse-worker
worker: federation-reader
type: ClusterIP
---
apiVersion: extensions/v1beta1
kind: Deployment
metadata:
labels:
app: matrix-synapse-worker
worker: federation-reader
name: federation-reader
namespace: matrix
spec:
replicas: 1
selector:
matchLabels:
app: matrix-synapse-worker
worker: federation-reader
template:
metadata:
annotations:
prometheus.io/path: /_synapse/metrics
prometheus.io/port: "9090"
prometheus.io/scrape: "true"
labels:
app: matrix-synapse-worker
worker: federation-reader
spec:
# Avoid co-locating workers with the main Synapse pod if possible
affinity:
podAntiAffinity:
preferredDuringSchedulingIgnoredDuringExecution:
- labelSelector:
matchExpressions:
- key: app
operator: In
values:
- matrix-synapse
topologyKey: kubernetes.io/hostname
containers:
- args:
- synapse.app.federation_reader
- -c
- /synapse/config/federation-reader.worker
env:
- name: SYNAPSE_CACHE_FACTOR
value: "2.00"
image: ananace/matrix-synapse:1.7.3
imagePullPolicy: IfNotPresent
name: worker
resources:
limits:
memory: 512Mi
volumeMounts:
- mountPath: /synapse/tls
name: matrix-synapse-tls
- mountPath: /synapse/keys
name: matrix-synapse-tls-dh
- mountPath: /synapse/config
name: matrix-synapse-config
restartPolicy: Always
securityContext:
fsGroup: 666
runAsGroup: 666
runAsUser: 666
volumes:
- name: matrix-synapse-tls
secret:
secretName: matrix-synapse-tls
- name: matrix-synapse-tls-dh
secret:
secretName: matrix-synapse-tls-dh
- configMap:
name: matrix-synapse
name: matrix-synapse-config