From eda26cac4a2a6b93e964b005a2142459120ca665 Mon Sep 17 00:00:00 2001 From: David Barrat Date: Tue, 23 Sep 2025 10:38:31 +0200 Subject: [PATCH 1/4] fix: don't expose nodePort if podHostNetwork is set to false --- livekit-server/templates/deployment.yaml | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/livekit-server/templates/deployment.yaml b/livekit-server/templates/deployment.yaml index 7b35cee..5c8071d 100644 --- a/livekit-server/templates/deployment.yaml +++ b/livekit-server/templates/deployment.yaml @@ -67,19 +67,25 @@ spec: {{- if .Values.livekit.rtc.udp_port }} - name: rtc-udp containerPort: {{ .Values.livekit.rtc.udp_port }} - hostPort: {{ .Values.livekit.rtc.udp_port }} + {{- if .Values.podHostNetwork }} + hostPort: {{ .Values.livekit.rtc.udp_port }} + {{- end }} protocol: UDP {{- end }} {{- if .Values.livekit.rtc.tcp_port }} - name: rtc-tcp containerPort: {{ .Values.livekit.rtc.tcp_port }} - hostPort: {{ .Values.livekit.rtc.tcp_port }} + {{- if .Values.podHostNetwork }} + hostPort: {{ .Values.livekit.rtc.tcp_port }} + {{- end }} protocol: TCP {{- end }} {{- if .Values.livekit.prometheus_port }} - name: metrics containerPort: {{ .Values.livekit.prometheus_port }} - hostPort: {{ .Values.livekit.prometheus_port }} + {{- if .Values.podHostNetwork }} + hostPort: {{ .Values.livekit.prometheus_port }} + {{- end }} protocol: TCP {{- end }} {{- if .Values.livekit.turn.enabled }} From 18a5c77dc3b57fc45cdebbcf9566b3e86e1d4483 Mon Sep 17 00:00:00 2001 From: David Barrat Date: Tue, 23 Sep 2025 13:46:47 +0200 Subject: [PATCH 2/4] Add udp and tls ports --- livekit-server/templates/deployment.yaml | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/livekit-server/templates/deployment.yaml b/livekit-server/templates/deployment.yaml index 5c8071d..6dc43ce 100644 --- a/livekit-server/templates/deployment.yaml +++ b/livekit-server/templates/deployment.yaml @@ -92,13 +92,17 @@ spec: {{- if .Values.livekit.turn.tls_port }} - name: turn-tls containerPort: {{ .Values.livekit.turn.tls_port }} - hostPort: {{ .Values.livekit.turn.tls_port }} + {{- if .Values.podHostNetwork }} + hostPort: {{ .Values.livekit.turn.tls_port }} + {{- end }} protocol: TCP {{- end }} {{- if .Values.livekit.turn.udp_port }} - name: turn-udp containerPort: {{ .Values.livekit.turn.udp_port }} - hostPort: {{ .Values.livekit.turn.udp_port }} + {{- if .Values.podHostNetwork }} + hostPort: {{ .Values.livekit.turn.udp_port }} + {{- end }} protocol: UDP {{- end }} {{- end }} From caa8b53120a585bd0da604ddc7596ab6c7c72042 Mon Sep 17 00:00:00 2001 From: David Barrat Date: Thu, 25 Sep 2025 14:09:33 +0200 Subject: [PATCH 3/4] Fix indentation --- livekit-server/templates/deployment.yaml | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/livekit-server/templates/deployment.yaml b/livekit-server/templates/deployment.yaml index 6dc43ce..fd0639c 100644 --- a/livekit-server/templates/deployment.yaml +++ b/livekit-server/templates/deployment.yaml @@ -21,10 +21,10 @@ spec: {{- end }} template: metadata: - {{- with .Values.podAnnotations }} annotations: + {{- with .Values.podAnnotations }} {{- toYaml . | nindent 8 }} - {{- end }} + {{- end }} checksum/config: {{ include (print $.Template.BasePath "/configmap.yaml") . | sha256sum }} labels: {{- include "livekit-server.selectorLabels" . | nindent 8 }} @@ -68,7 +68,7 @@ spec: - name: rtc-udp containerPort: {{ .Values.livekit.rtc.udp_port }} {{- if .Values.podHostNetwork }} - hostPort: {{ .Values.livekit.rtc.udp_port }} + hostPort: {{ .Values.livekit.rtc.udp_port }} {{- end }} protocol: UDP {{- end }} @@ -76,7 +76,7 @@ spec: - name: rtc-tcp containerPort: {{ .Values.livekit.rtc.tcp_port }} {{- if .Values.podHostNetwork }} - hostPort: {{ .Values.livekit.rtc.tcp_port }} + hostPort: {{ .Values.livekit.rtc.tcp_port }} {{- end }} protocol: TCP {{- end }} @@ -84,7 +84,7 @@ spec: - name: metrics containerPort: {{ .Values.livekit.prometheus_port }} {{- if .Values.podHostNetwork }} - hostPort: {{ .Values.livekit.prometheus_port }} + hostPort: {{ .Values.livekit.prometheus_port }} {{- end }} protocol: TCP {{- end }} @@ -93,7 +93,7 @@ spec: - name: turn-tls containerPort: {{ .Values.livekit.turn.tls_port }} {{- if .Values.podHostNetwork }} - hostPort: {{ .Values.livekit.turn.tls_port }} + hostPort: {{ .Values.livekit.turn.tls_port }} {{- end }} protocol: TCP {{- end }} @@ -101,7 +101,7 @@ spec: - name: turn-udp containerPort: {{ .Values.livekit.turn.udp_port }} {{- if .Values.podHostNetwork }} - hostPort: {{ .Values.livekit.turn.udp_port }} + hostPort: {{ .Values.livekit.turn.udp_port }} {{- end }} protocol: UDP {{- end }} From c7816d6e662b850754125b16dddb033e461d14d6 Mon Sep 17 00:00:00 2001 From: David Barrat Date: Thu, 25 Sep 2025 14:11:18 +0200 Subject: [PATCH 4/4] Fix indentation --- livekit-server/templates/deployment.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/livekit-server/templates/deployment.yaml b/livekit-server/templates/deployment.yaml index fd0639c..2acad25 100644 --- a/livekit-server/templates/deployment.yaml +++ b/livekit-server/templates/deployment.yaml @@ -21,10 +21,10 @@ spec: {{- end }} template: metadata: + {{- with .Values.podAnnotations }} annotations: - {{- with .Values.podAnnotations }} {{- toYaml . | nindent 8 }} - {{- end }} + {{- end }} checksum/config: {{ include (print $.Template.BasePath "/configmap.yaml") . | sha256sum }} labels: {{- include "livekit-server.selectorLabels" . | nindent 8 }}