feat(mycloud-matrix): add sliding-sync support
This commit is contained in:
parent
141001b2ff
commit
150153e653
4 changed files with 109 additions and 3 deletions
18
base-values/mycloud-matrix-sliding-sync.yaml
Normal file
18
base-values/mycloud-matrix-sliding-sync.yaml
Normal file
|
@ -0,0 +1,18 @@
|
|||
##
|
||||
# commons are from mycloud-core
|
||||
##
|
||||
|
||||
components:
|
||||
mycloud-services:
|
||||
# patch mycloud-core to get another database
|
||||
values:
|
||||
databases:
|
||||
matrix-sliding-sync:
|
||||
type: postgresql
|
||||
|
||||
mycloud-matrix:
|
||||
# patch mycloud-core to get another database
|
||||
values:
|
||||
server:
|
||||
slidingSync:
|
||||
enabled: true
|
68
mycloud-matrix/templates/server/sliding-sync.yaml
Normal file
68
mycloud-matrix/templates/server/sliding-sync.yaml
Normal file
|
@ -0,0 +1,68 @@
|
|||
{{- if .Values.server.slidingSync.enabled }}
|
||||
---
|
||||
apiVersion: helm.toolkit.fluxcd.io/v2beta2
|
||||
kind: HelmRelease
|
||||
metadata:
|
||||
name: "{{ .Release.Name }}-sliding-sync"
|
||||
spec:
|
||||
chart:
|
||||
spec:
|
||||
sourceRef:
|
||||
kind: GitRepository
|
||||
name: "wrenix-helm-charts"
|
||||
namespace: "flux-system"
|
||||
chart: "./matrix-sliding-sync"
|
||||
reconcileStrategy: "Revision"
|
||||
install:
|
||||
{{- toYaml .Values.commons.helm.release.install | nindent 4 }}
|
||||
test:
|
||||
{{- toYaml .Values.commons.helm.release.test | nindent 4 }}
|
||||
upgrade:
|
||||
{{- toYaml .Values.commons.helm.release.upgrade | nindent 4 }}
|
||||
driftDetection:
|
||||
{{- toYaml .Values.commons.helm.release.driftDetection | nindent 4 }}
|
||||
interval: 10m
|
||||
values:
|
||||
{{- $host := .Values.ingress.slidingSync.host | default (printf "sliding.matrix.%s" .Values.commons.ingress.domain) }}
|
||||
config:
|
||||
homeserver: http://{{ .Release.Name }}-synapse:8008
|
||||
logLevel: INFO
|
||||
postgresql:
|
||||
host: {{ .Values.databases.slidingSync.host | quote }}
|
||||
username: {{ .Values.databases.slidingSync.username | quote }}
|
||||
password: {{ .Values.databases.slidingSync.password | default (derivePassword 1 "long" .Values.commons.masterPassword "matrix-sliding-sync" "database_password" | b64enc) | quote }}
|
||||
database: {{ .Values.databases.slidingSync.name | quote }}
|
||||
|
||||
ingress:
|
||||
enabled: true
|
||||
annotations:
|
||||
{{- with .Values.commons.ingress.annotations }}
|
||||
{{- toYaml . | nindent 8 }}
|
||||
{{- end }}
|
||||
{{- with .Values.ingress.annotations }}
|
||||
{{- toYaml . | nindent 8 }}
|
||||
{{- end }}
|
||||
includeServerName: false
|
||||
hosts:
|
||||
- host: "{{ $host }}"
|
||||
paths:
|
||||
- path: "/"
|
||||
pathType: Prefix
|
||||
{{- if .Values.commons.ingress.tls.enabled }}
|
||||
tls:
|
||||
{{- with .Values.commons.ingress.tls.override }}
|
||||
{{- toYaml . | nindent 8 }}
|
||||
{{- else }}
|
||||
- secretName: "mycloud-matrix-sliding-sync-cert"
|
||||
hosts:
|
||||
- "{{ $host }}"
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
|
||||
|
||||
prometheus:
|
||||
servicemonitor:
|
||||
enabled: {{ (.Capabilities.APIVersions.Has "monitoring.coreos.com/v1/ServiceMonitor") }}
|
||||
labels:
|
||||
{{- toYaml .Values.commons.prometheus.monitor.labels | nindent 10 }}
|
||||
{{- end }}{{/* end-if .server.sldingSync.enabled */}}
|
|
@ -154,6 +154,13 @@ spec:
|
|||
|
||||
wellknown:
|
||||
enabled: true
|
||||
client:
|
||||
"m.homeserver":
|
||||
base_url: "https://{{ $host }}/"
|
||||
{{- if .Values.server.slidingSync.enabled }}
|
||||
"org.matrix.msc3575.proxy":
|
||||
url: "https://{{ .Values.ingress.slidingSync.host | default (printf "sliding.matrix.%s" .Values.commons.ingress.domain) }}/"
|
||||
{{- end }}
|
||||
resources:
|
||||
requests:
|
||||
cpu: 0.1
|
||||
|
@ -191,7 +198,7 @@ spec:
|
|||
{{- with .Values.commons.ingress.tls.override }}
|
||||
{{- toYaml . | nindent 8 }}
|
||||
{{- else }}
|
||||
- secretName: "mycloud-metrix-server-cert"
|
||||
- secretName: "mycloud-matrix-server-cert"
|
||||
hosts:
|
||||
- "{{ .Values.commons.ingress.domain }}"
|
||||
- "{{ $host }}"
|
||||
|
|
|
@ -62,6 +62,8 @@ server:
|
|||
host:
|
||||
software: "synapse"
|
||||
scaling: false
|
||||
slidingSync:
|
||||
enabled: false
|
||||
|
||||
auth:
|
||||
# -- generated by .commons.masterPassword
|
||||
|
@ -87,6 +89,10 @@ ingress:
|
|||
# -- default: matrix.(.commons.ingress.domain)
|
||||
host:
|
||||
annotations:
|
||||
slidingSync:
|
||||
# -- default: sliding.matrix.(.commons.ingress.domain)
|
||||
host:
|
||||
annotations:
|
||||
element:
|
||||
enabled: true
|
||||
# -- default: element.(.commons.ingress.domain)
|
||||
|
@ -100,15 +106,22 @@ ingress:
|
|||
|
||||
databases:
|
||||
server:
|
||||
# -- default is from mysql-services
|
||||
# -- default is from mycloud-services
|
||||
host: mycloud-services-postgresql
|
||||
name: matrix-synapse
|
||||
username: matrix-synapse
|
||||
# -- generated by .commons.masterPassword (equal to mycloud-services)
|
||||
password:
|
||||
slidingSync:
|
||||
# -- default is from mycloud-services
|
||||
host: mycloud-services-postgresql
|
||||
name: matrix-sliding-sync
|
||||
username: matrix-sliding-sync
|
||||
# -- generated by .commons.masterPassword (equal to mycloud-services)
|
||||
password:
|
||||
bridge:
|
||||
signal:
|
||||
# -- default is from mysql-services
|
||||
# -- default is from mycloud-services
|
||||
host: mycloud-services-postgresql
|
||||
name: matrix-bridge-signal
|
||||
username: matrix-bridge-signal
|
||||
|
|
Loading…
Add table
Reference in a new issue