Skip to content

Commit

Permalink
Fix WebSockets options and move them to separate section
Browse files Browse the repository at this point in the history
This commit removes the old-style options located in `.Values.jvb.websockets`.
Now, if you want to add WebSockets support, instead of doing this:
```yaml
jvb:
  websockets:
    enabled: true
    serverID: <...>
```
you must do this:
```yaml
websockets:
  colibri:
    enabled: true
    serverID: <...>
  ## New option for Prosody/XMPP:
  xmpp:
    enabled: true
```

Also, now disabled WS support actually explicitly sets required ENV variables to
'false'.
  • Loading branch information
spijet committed Nov 22, 2022
1 parent 25cd3e4 commit cd3fa5e
Show file tree
Hide file tree
Showing 7 changed files with 46 additions and 30 deletions.
5 changes: 3 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,9 @@ Parameter | Description | Default
`imagePullSecrets` | List of names of secrets resources containing private registry credentials | `[]`
`enableAuth` | Enable authentication | `false`
`enableGuests` | Enable guest access | `true`
`websockets.colibri.enabled` | Enable WebSocket support for JVB/Colibri | `false`
`websockets.colibri.serverID` | Set JVB/Colibri WS Server ID | `podIP` (see `values.yaml`)
`websockets.xmpp.enabled` | Enable WebSocket support for Prosody/XMPP | `false`
`jibri.enabled` | Enable Jibri service | `false`
`jibri.persistence.enabled` | Enable persistent storage for Jibri recordings | `false`
`jibri.persistence.size` | Jibri persistent storage size | `4Gi`
Expand Down Expand Up @@ -128,8 +131,6 @@ Parameter | Description | Default
`jvb.xmpp.password` | Password used by jvb to authenticate on the XMPP service | 10 random chars
`jvb.livenessProbe` | Map that holds the liveness probe, you can add parameters such as timeout or retries following the Kubernetes spec | A livenessProbe map
`jvb.readinessProbe` | Map that holds the liveness probe, you can add parameters such as timeout or retries following the Kubernetes spec | A readinessProbe map
`jvb.websockets.enabled` | Enable WebSocket support for JVB/Colibri | `false`
`jvb.websockets.serverID` | Set JVB/Colibri WS Server ID | `podIP` (see `values.yaml`)
`jvb.metrics.enabled` | Boolean that control the metrics exporter for jvb. If true the `ServiceMonitor` will also created | `false`
`jvb.metrics.prometheusAnnotations` | Boolean that controls the generation of prometheus annotations, to expose metrics for HPA | `false`
`jvb.metrics.image.repository` | Default image repository for metrics exporter | `docker.io/systemli/prometheus-jitsi-meet-exporter`
Expand Down
13 changes: 12 additions & 1 deletion templates/common-configmap.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,19 @@ data:
XMPP_GUEST_DOMAIN: {{ .Values.xmpp.guestDomain | default (printf "guest.%s" (include "jitsi-meet.xmpp.domain" .)) }}
XMPP_RECORDER_DOMAIN: {{ .Values.xmpp.recorderDomain | default (printf "recorder.%s" (include "jitsi-meet.xmpp.domain" .)) }}
XMPP_INTERNAL_MUC_DOMAIN: {{ .Values.xmpp.internalMucDomain | default (printf "internal-muc.%s" (include "jitsi-meet.xmpp.domain" .)) }}
{{- if or .Values.websockets.colibri.enabled }}
ENABLE_COLIBRI_WEBSOCKET: 'true'
{{- else }}
ENABLE_COLIBRI_WEBSOCKET: 'false'
{{- end }}
{{- if .Values.websockets.xmpp.enabled }}
ENABLE_XMPP_WEBSOCKET: 'true'
{{- else }}
ENABLE_XMPP_WEBSOCKET: 'false'
{{- end }}
{{- if .Values.jibri.enabled }}
ENABLE_RECORDING: "true"
ENABLE_FILE_RECORDING_SERVICE_SHARING: "true"
{{- end }}
TZ: '{{ .Values.tz }}'
{{- range $key, $value := .Values.extraCommonEnvs }}
Expand All @@ -28,4 +39,4 @@ data:
TESTING_OCTO_PROBABILITY: "1"
DEPLOYMENTINFO_REGION: "all"
DEPLOYMENTINFO_USERREGION: "all"
{{- end }}
{{- end }}
7 changes: 1 addition & 6 deletions templates/jvb/configmap.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,13 +16,8 @@ data:
{{- end }}
{{- end }}
COLIBRI_REST_ENABLED: 'true'
{{- if .Values.jvb.websockets.enabled }}
ENABLE_COLIBRI_WEBSOCKET: 'true'
{{- else }}
ENABLE_COLIBRI_WEBSOCKET: 'false'
{{- end }}
{{- if .Values.octo.enabled }}
ENABLE_OCTO: "1"
JVB_OCTO_BIND_PORT: "4096"
JVB_OCTO_REGION: "all"
{{- end }}
{{- end }}
6 changes: 3 additions & 3 deletions templates/jvb/deployment.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{{- $serverID := default "podIP" .Values.jvb.websockets.serverID }}
{{- $serverID := default "podIP" .Values.websockets.colibri.serverID }}
apiVersion: apps/v1
kind: Deployment
metadata:
Expand Down Expand Up @@ -75,7 +75,7 @@ spec:
fieldPath: status.hostIP
{{- end }}
{{- end }}
{{- if .Values.jvb.websockets.enabled }}
{{- if or .Values.websockets.colibri.enabled }}
- name: JVB_WS_SERVER_ID
{{- if eq $serverID "service" }}
{{- if .Values.global.clusterDomain }}
Expand Down Expand Up @@ -108,7 +108,7 @@ spec:
hostPort: {{ .Values.jvb.UDPPort }}
{{- end }}
protocol: UDP
{{- if .Values.jvb.websockets.enabled }}
{{- if or .Values.websockets.colibri.enabled }}
- name: colibri-ws-tcp
containerPort: 9090
protocol: TCP
Expand Down
2 changes: 1 addition & 1 deletion templates/jvb/service.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ spec:
{{- end }}
protocol: UDP
name: rtp-udp
{{- if .Values.jvb.websockets.enabled }}
{{- if or .Values.websockets.colibri.enabled }}
- port: 9090
protocol: TCP
name: colibri-ws-tcp
Expand Down
4 changes: 1 addition & 3 deletions templates/web/configmap.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,7 @@ data:
ENABLE_HTTP_REDIRECT: {{ ternary "1" "0" .Values.web.httpRedirect | quote }}
JICOFO_AUTH_USER: '{{ .Values.jicofo.xmpp.user }}'
XMPP_BOSH_URL_BASE: 'http://{{ include "jitsi-meet.xmpp.server" . }}:{{ index .Values.prosody.service.ports "bosh-insecure" }}'
{{- if .Values.jibri.enabled }}
ENABLE_RECORDING: "true"
ENABLE_FILE_RECORDING_SERVICE_SHARING: "true"
{{- if .Values.web.resolverIP }}
NGINX_RESOLVER: {{ .Values.web.resolverIP }}
{{- end }}
{{- range $key, $value := .Values.web.extraEnvs }}
Expand Down
39 changes: 25 additions & 14 deletions values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,31 @@ tz: Europe/Amsterdam
image:
pullPolicy: IfNotPresent

## WebSocket configuration:
#
# Both Colibri and XMPP WebSockets are disabled by default,
# since some LoadBalancer / Reverse Proxy setups can't pass
# WebSocket connections properly, which might result in breakage
# for some clients.
#
# Enable both Colibri and XMPP WebSockets to replicate the current
# upstream `meet.jit.si` setup. Keep both disabled to replicate
# older setups which might be more compatible in some cases.
websockets:
## Colibri (JVB signalling):
colibri:
enabled: false
## Uncomment this to set JVB server ID manually,
## Or use one of pre-defined values:
## * "podIP" will fetch JVB pod's IP address from K8s metadata;
## * "service" will use JVB service name generated by Helm.
##
## (default is "podIP")
# serverID: podIP
## XMPP (Prosody signalling):
xmpp:
enabled: false

web:
replicaCount: 1
image:
Expand Down Expand Up @@ -180,20 +205,6 @@ jvb:
affinity: {}
extraEnvs: {}

websockets:
## Set to 'true' to enable Colibri WebSocket support in JVB:
enabled: false
## Uncomment this to set JVB server ID manually,
## Or use one of pre-defined values:
## * "podIP" will fetch JVB pod's IP address from K8s metadata;
## * "service" will use JVB service name generated by Helm.
##
## Don't forget to set `web.resolverIP` to your cluster's
## DNS service IP!
##
## (default is "podIP")
# serverID: podIP

metrics:
enabled: false
prometheusAnnotations: false
Expand Down

0 comments on commit cd3fa5e

Please sign in to comment.