commit cde893d4f48df4ae2f04738772f6bfb0dfb559b5
parent 3dc69ebacb0fd9eba8fcae3702124fd67490a20c
Author: MTRNord <mtrnord1@gmail.com>
Date: Tue, 20 Jun 2023 19:42:07 +0200
Add synapse draupnir
Diffstat:
6 files changed, 150 insertions(+), 0 deletions(-)
diff --git a/apps/base/matrix/draupnir-synapse/kustomization.yaml b/apps/base/matrix/draupnir-synapse/kustomization.yaml
@@ -0,0 +1,5 @@
+apiVersion: kustomize.config.k8s.io/v1beta1
+kind: Kustomization
+namespace: matrix
+resources:
+ - release.yaml
diff --git a/apps/base/matrix/draupnir-synapse/release.yaml b/apps/base/matrix/draupnir-synapse/release.yaml
@@ -0,0 +1,73 @@
+---
+apiVersion: helm.toolkit.fluxcd.io/v2beta1
+kind: HelmRelease
+metadata:
+ name: draupnir-synapse
+ namespace: matrix
+spec:
+ chart:
+ spec:
+ chart: matrix-synapse
+ sourceRef:
+ kind: HelmRepository
+ name: ananace-charts
+ interval: 50m
+ install:
+ remediation:
+ retries: 3
+ values:
+ wellknown:
+ enabled: true
+ extraData:
+ support:
+ admins:
+ - email_address: "support@nordgedanken.dev"
+ role: "admin"
+ image:
+ pullSecrets:
+ - name: docker
+ persistence:
+ size: 10Gi
+ volumePermissions:
+ enabled: true
+ synapse:
+ ## Liveness probe configuration to use
+ ##
+ livenessProbe:
+ timeoutSeconds: 60
+ failureThreshold: 5
+ httpGet:
+ path: /health
+ port: http
+
+ ## Readiness probe configuration to use
+ ##
+ readinessProbe:
+ timeoutSeconds: 60
+ failureThreshold: 5
+ httpGet:
+ path: /health
+ port: http
+
+ extraCommands: []
+ extraEnv:
+ - name: LD_PRELOAD
+ value: /usr/lib/x86_64-linux-gnu/libjemalloc.so.2
+ - name: SYNAPSE_CACHE_FACTOR
+ value: "2"
+ annotations:
+ prometheus.io/scrape: "true"
+ prometheus.io/path: "/_synapse/metrics"
+ prometheus.io/port: "9090"
+
+ redis:
+ architecture: standalone
+ postgresql:
+ enabled: false
+ externalPostgresql:
+ host: matrix-postgres-cluster.matrix-postgres-cluster.svc.cluster.local
+ port: 5432
+
+ ## Password key to be retrieved from existing secret
+ existingSecretPasswordKey: password
+ sslmode: require
diff --git a/apps/base/matrix/kustomization.yaml b/apps/base/matrix/kustomization.yaml
@@ -6,3 +6,4 @@ resources:
- ./media-repo
- ./sliding-proxy
- ./synapse
+ - ./draupnir-synapse
diff --git a/apps/production/kustomization.yaml b/apps/production/kustomization.yaml
@@ -28,3 +28,4 @@ patchesStrategicMerge:
- postgres-exporter-values.yaml
- redmine-values.yaml
- mailu-values.yaml
+ - synapse-draupnir.yaml
diff --git a/apps/production/synapse-draupnir.yaml b/apps/production/synapse-draupnir.yaml
@@ -0,0 +1,68 @@
+apiVersion: helm.toolkit.fluxcd.io/v2beta1
+kind: HelmRelease
+metadata:
+ name: draupnir-synapse
+ namespace: matrix
+spec:
+ chart:
+ spec:
+ version: 3.3.x
+ values:
+ signingkey:
+ job:
+ enabled: true
+ image:
+ repository: coreharbor.kubernetes.midnightthoughts.space/matrixdotorg/synapse
+ # TODO update properly again
+ tag: v1.85.2
+ #pullPolicy: Always
+ serverName: draupnir.midnightthoughts.space
+ publicServerName: matrix.draupnir.midnightthoughts.space
+ wellknown:
+ client:
+ m.homeserver:
+ base_url: https://matrix.draupnir.midnightthoughts.space
+ config:
+ reportStats: true
+ enableRegistration: false
+ extraConfig:
+ #app_service_config_files:
+ # - /data/draupnir-registration.yaml
+ ingress:
+ traefikPaths: true
+ hosts:
+ - draupnir.midnightthoughts.space
+ - matrix.draupnir.midnightthoughts.space
+ tls:
+ - hosts:
+ - draupnir.midnightthoughts.space
+ - matrix.draupnir.midnightthoughts.space
+ secretName: draupnir-midnightthoughts-synapse-tls-secret
+ annotations:
+ cert-manager.io/cluster-issuer: letsencrypt-dns
+ traefik.ingress.kubernetes.io/router.tls: "true"
+ traefik.ingress.kubernetes.io/router.middlewares: default-hsts@kubernetescrd,default-compress@kubernetescrd,default-redirect-https@kubernetescrd
+ workers:
+ default:
+ volumeMounts:
+ #- mountPath: /data/draupnir-registration.yaml
+ # subPath: registration.yaml
+ # name: draupnir-config-volume
+ volumes:
+ #- name: draupnir-config-volume
+ # configMap:
+ # name: draupnir-bridge-config
+ synapse:
+ extraVolumeMounts:
+ #- mountPath: /data/draupnir-registration.yaml
+ # subPath: registration.yaml
+ # name: draupnir-config-volume
+ extraVolumes:
+ #- name: draupnir-config-volume
+ # configMap:
+ # name: draupnir-bridge-config
+ externalPostgresql:
+ username: draupnir_synapse
+ ## The name of an existing secret with postgresql credentials
+ existingSecret: draupnir_synapse-midnightthoughts-postgresql
+ database: draupnir_synapse
diff --git a/infrastructure/configs/postgres-clusters.yaml b/infrastructure/configs/postgres-clusters.yaml
@@ -15,6 +15,7 @@ spec:
enableShmVolume: true
databases:
synapse: synapse
+ draupnir_synapse: draupnir_synapse
matrix_media_repo: matrix_media_repo
syncv3: syncv3
signal_bridge: signal_bridge
@@ -66,6 +67,7 @@ spec:
teamId: matrix
users:
synapse: []
+ draupnir_synapse: []
matrix_media_repo: []
syncv3: []
signal_bridge: []