Skip to content

Commit d9da403

Browse files
authored
Merge pull request #765 from element-hq/bbz/fix-matricrtc-render-config
Bake NODE_IP into the SFU config
2 parents 296d5b9 + ad34855 commit d9da403

File tree

8 files changed

+50
-11
lines changed

8 files changed

+50
-11
lines changed

charts/matrix-stack/ci/fragments/matrix-rtc-manual-ip.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,5 @@
44

55
matrixRTC:
66
sfu:
7+
useStunToDiscoverPublicIP: false
78
manualIP: 198.51.100.2
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
# Copyright 2025 New Vector Ltd
2+
#
3+
# SPDX-License-Identifier: AGPL-3.0-only
4+
5+
matrixRTC:
6+
sfu:
7+
useStunToDiscoverPublicIP: true

charts/matrix-stack/ci/matrix-rtc-no-stun-manual-ip-values.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ matrixRTC:
2828
portType: HostPort
2929
hostNetwork: true
3030
manualIP: 198.51.100.2
31+
useStunToDiscoverPublicIP: false
3132
synapse:
3233
enabled: false
3334
wellKnownDelegation:
Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
# Copyright 2024-2025 New Vector Ltd
2+
#
3+
# SPDX-License-Identifier: AGPL-3.0-only
4+
#
5+
# source_fragments: matrix-rtc-host-mode.yaml matrix-rtc-minimal.yaml matrix-rtc-stun.yaml
6+
# DO NOT EDIT DIRECTLY. Edit the fragment files to add / modify / remove values
7+
8+
# initSecrets, postgres don't have any required properties to be set and defaults to enabled
9+
deploymentMarkers:
10+
enabled: false
11+
elementAdmin:
12+
enabled: false
13+
elementWeb:
14+
enabled: false
15+
matrixAuthenticationService:
16+
enabled: false
17+
matrixRTC:
18+
ingress:
19+
host: mrtc.ess.localhost
20+
sfu:
21+
exposedServices:
22+
rtcMuxedUdp:
23+
portType: HostPort
24+
rtcTcp:
25+
portType: HostPort
26+
rtcUdp:
27+
enabled: true
28+
portType: HostPort
29+
hostNetwork: true
30+
useStunToDiscoverPublicIP: true
31+
synapse:
32+
enabled: false
33+
wellKnownDelegation:
34+
enabled: false

charts/matrix-stack/configs/matrix-rtc/sfu/config-underrides.yaml.tpl

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -10,13 +10,8 @@ SPDX-License-Identifier: AGPL-3.0-only
1010
{{- /* TODO: Move me to overrides after 25.10 is out. */ -}}
1111
rtc:
1212
use_external_ip: {{ .useStunToDiscoverPublicIP }}
13-
{{ if .manualIP }}
14-
# To workaround https://github.com/livekit/livekit/issues/2088
15-
# Any IP address is acceptable, it doesn't need to be a correct one,
16-
# it just needs to be present to get LiveKit to skip checking all local interfaces
17-
# We assign here a TEST-NET IP which is
18-
# overridden by the NODE_IP env var at runtime
19-
node_ip: 198.51.100.1
13+
{{ if or .manualIP (not .useStunToDiscoverPublicIP) }}
14+
node_ip: ${NODE_IP}
2015
{{- end }}
2116
# turn server
2217
turn:

charts/matrix-stack/templates/matrix-rtc/_sfu_helpers.tpl

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -34,11 +34,10 @@ env: []
3434
{{- $root := .root -}}
3535
{{- with required "element-io.matrix-rtc-sfu.renderConfigOverrideEnv missing context" .context -}}
3636
env:
37-
{{- with $root.Values.matrixRTC.sfu.manualIP }}
37+
{{- if $root.Values.matrixRTC.sfu.manualIP }}
3838
- name: NODE_IP
39-
value: "{{ . }}"
40-
{{- end }}
41-
{{- if and (not $root.Values.matrixRTC.sfu.useStunToDiscoverPublicIP) (not $root.Values.matrixRTC.sfu.manualIP) }}
39+
value: "{{ $root.Values.matrixRTC.sfu.manualIP }}"
40+
{{- else if not $root.Values.matrixRTC.sfu.useStunToDiscoverPublicIP }}
4241
- name: NODE_IP
4342
valueFrom:
4443
fieldRef:

newsfragments/765.fixed.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Fix Matrix RTC SFU manualIP setting so that it correctly propagates through.

newsfragments/765.internal.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
CI: update Matrix RTC values files to cover STUN, Manual IP, and Node IP cases correctly.

0 commit comments

Comments
 (0)