From 540aff3edf11adc01b1b7e84c86fc7ee16a45b53 Mon Sep 17 00:00:00 2001 From: shcherbak Date: Tue, 3 Dec 2024 09:58:04 +0200 Subject: [PATCH 1/2] MSC3266-element-call --- charts/synapse/templates/synapse-configmap.yaml | 10 +++++++++- .../synapse/templates/well-known-configmap.yaml | 16 ++++++++++++++++ charts/synapse/values.yaml | 7 +++++++ 3 files changed, 32 insertions(+), 1 deletion(-) diff --git a/charts/synapse/templates/synapse-configmap.yaml b/charts/synapse/templates/synapse-configmap.yaml index 3b6bbe3..2e36858 100644 --- a/charts/synapse/templates/synapse-configmap.yaml +++ b/charts/synapse/templates/synapse-configmap.yaml @@ -255,9 +255,17 @@ data: search_all_users: {{ $.Values.synapse.search_all_users }} prefer_local_users: true web_client_location: "https://{{ $.Values.synapse.serverName }}/" - {{- if $.Values.matrixAuthentication.enabled }} + # The maximum allowed duration by which sent events can be delayed, as + # per MSC4140. + max_event_delay_duration: 24h + {{- if or $.Values.matrixAuthentication.enabled $.Values.experimentalFeatures.msc3266.enabled }} # https://matrix-org.github.io/matrix-authentication-service/setup/homeserver.html#configure-the-homeserver-to-delegate-authentication-to-the-service experimental_features: + # MSC3266: Room summary API. Used for knocking over federation + # MSC3266 allows to request a room summary of rooms you are not joined. The summary contains the room join rules. + # We need that to decide if the user gets prompted with the option to knock ("Request to join call"), a cannot join error or the join view. + msc3266: + enabled: {{ $.Values.experimentalFeatures.msc3266.enabled }} {{- if $.Values.experimentalFeatures.msc3861.enabled }} msc3861: {{ $.Values.experimentalFeatures.msc3861 | toYaml | nindent 8 }} {{- end }} diff --git a/charts/synapse/templates/well-known-configmap.yaml b/charts/synapse/templates/well-known-configmap.yaml index 39525f4..a1cb640 100644 --- a/charts/synapse/templates/well-known-configmap.yaml +++ b/charts/synapse/templates/well-known-configmap.yaml @@ -38,6 +38,22 @@ data: "base_url":"https://vector.im" }, {{- end }} + {{- if .Values.experimentalFeatures.msc3266.enabled }} + "org.matrix.msc4143.rtc_foci": [ + { + "type": "livekit", + "livekit_service_url": "https://someurl.com" + }, + { + "type": "livekit", + "livekit_service_url": "https://livekit2.com" + }, + { + "type": "another_foci", + "props_for_another_foci": "val" + }, + ], + {{- end }} "jitsi": { "preferredDomain": "meet.jit.si" }, diff --git a/charts/synapse/values.yaml b/charts/synapse/values.yaml index ec927ea..b75f54a 100644 --- a/charts/synapse/values.yaml +++ b/charts/synapse/values.yaml @@ -143,6 +143,11 @@ synapse: rc_message: per_second: 100 burst_count: 300 + # recommended for MSC3266 + # This needs to match at least the heart-beat frequency plus a bit of headroom + # Currently the heart-beat is every 5 seconds which translates into a rate of 0.2s + # per_second: 0.5 + # burst_count: 30 federation_domain_whitelist: [] @@ -177,6 +182,8 @@ experimentalFeatures: client_secret: NOT-CONFIGURED admin_token: NOT-CONFIGURED account_management_url: NOT-CONFIGURED + msc3266: + enabled: false ingress: secretName: '' From 94cd10f56c7c195e7b2f9813f5a5b6d559a30e3b Mon Sep 17 00:00:00 2001 From: shcherbak Date: Tue, 3 Dec 2024 12:33:15 +0200 Subject: [PATCH 2/2] add msc3266 support --- charts/synapse/Chart.yaml | 2 +- charts/synapse/templates/synapse-configmap.yaml | 9 ++++++--- charts/synapse/templates/well-known-configmap.yaml | 12 ++---------- charts/synapse/values.yaml | 6 ++++++ 4 files changed, 15 insertions(+), 14 deletions(-) diff --git a/charts/synapse/Chart.yaml b/charts/synapse/Chart.yaml index d8cdb99..04252e2 100644 --- a/charts/synapse/Chart.yaml +++ b/charts/synapse/Chart.yaml @@ -1,3 +1,3 @@ --- name: synapse -version: 0.6.0 +version: 0.7.0 diff --git a/charts/synapse/templates/synapse-configmap.yaml b/charts/synapse/templates/synapse-configmap.yaml index 2e36858..f21f902 100644 --- a/charts/synapse/templates/synapse-configmap.yaml +++ b/charts/synapse/templates/synapse-configmap.yaml @@ -255,17 +255,20 @@ data: search_all_users: {{ $.Values.synapse.search_all_users }} prefer_local_users: true web_client_location: "https://{{ $.Values.synapse.serverName }}/" - # The maximum allowed duration by which sent events can be delayed, as - # per MSC4140. - max_event_delay_duration: 24h + {{- if $.Values.synapse.max_event_delay_duration }} + # The maximum allowed duration by which sent events can be delayed, as per MSC4140. + max_event_delay_duration: {{ $.Values.synapse.max_event_delay_duration }} + {{- end }} {{- if or $.Values.matrixAuthentication.enabled $.Values.experimentalFeatures.msc3266.enabled }} # https://matrix-org.github.io/matrix-authentication-service/setup/homeserver.html#configure-the-homeserver-to-delegate-authentication-to-the-service experimental_features: + {{- if $.Values.experimentalFeatures.msc3266.enabled }} # MSC3266: Room summary API. Used for knocking over federation # MSC3266 allows to request a room summary of rooms you are not joined. The summary contains the room join rules. # We need that to decide if the user gets prompted with the option to knock ("Request to join call"), a cannot join error or the join view. msc3266: enabled: {{ $.Values.experimentalFeatures.msc3266.enabled }} + {{- end }} {{- if $.Values.experimentalFeatures.msc3861.enabled }} msc3861: {{ $.Values.experimentalFeatures.msc3861 | toYaml | nindent 8 }} {{- end }} diff --git a/charts/synapse/templates/well-known-configmap.yaml b/charts/synapse/templates/well-known-configmap.yaml index a1cb640..936ce5d 100644 --- a/charts/synapse/templates/well-known-configmap.yaml +++ b/charts/synapse/templates/well-known-configmap.yaml @@ -42,16 +42,8 @@ data: "org.matrix.msc4143.rtc_foci": [ { "type": "livekit", - "livekit_service_url": "https://someurl.com" - }, - { - "type": "livekit", - "livekit_service_url": "https://livekit2.com" - }, - { - "type": "another_foci", - "props_for_another_foci": "val" - }, + "livekit_service_url": "https://{{ .Values.livekitServer.ingress.host }}" + } ], {{- end }} "jitsi": { diff --git a/charts/synapse/values.yaml b/charts/synapse/values.yaml index b75f54a..996d795 100644 --- a/charts/synapse/values.yaml +++ b/charts/synapse/values.yaml @@ -7,6 +7,8 @@ synapse: allow_device_name_lookup_over_federation: false search_all_users: false allow_public_rooms_over_federation: false + # The maximum allowed duration by which sent events can be delayed, as per MSC4140. + max_event_delay_duration: '' # 24h # cfg -- image: repository: "ghcr.io/code-tool/matrix-stack/synapse" @@ -550,3 +552,7 @@ wellKnown: resourceQuota: enabled: true + +livekitServer: + ingress: + host: ''