Skip to content

Commit

Permalink
Introduce support for multiple public IPs
Browse files Browse the repository at this point in the history
  • Loading branch information
spijet committed Dec 9, 2022
1 parent f0ca048 commit 73d6143
Show file tree
Hide file tree
Showing 5 changed files with 36 additions and 13 deletions.
23 changes: 17 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,13 @@ jvb:
service:
type: LoadBalancer

# Depending on the cloud, publicIP cannot be know in advance, so deploy first, without the next option.
# Depending on the cloud, LB's public IP cannot be known in advance, so deploy first, without the next option.
# Next: redeploy with the following option set to the public IP you retrieved from the API.
publicIP: 1.2.3.4
# Additionally, you can add your cluster's public IPs if you want to use direct connection as a fallback.
publicIPs:
- 1.2.3.4
# - 30.10.10.1
# - 30.10.10.2
```

In this case you're not allowed to change the `jvb.replicaCount` to more than `1`, UDP packets will be routed to random `jvb`, which would not allow for a working video setup.
Expand All @@ -43,11 +47,14 @@ In this case you're not allowed to change the `jvb.replicaCount` to more than `1
jvb:
service:
type: NodePort
# It may be required to change the default port to a value allowed by Kubernetes (30000-32768)
UDPPort: 30000
# Set the following variable if you want to use a specific external port for the service.
# The default is to select a random port from Kubelet's allowed NodePort range (30000-32767).

# Use public IP of one of your node, or the public IP of a loadbalancer in front of the nodes
publicIP: 1.2.3.4
# nodePort: 10000

# Use public IP of one of your nodes, or the public IP of an external LB:
publicIPs:
- 30.10.10.1
```
In this case you're not allowed to change the `jvb.replicaCount` to more than `1`, UDP packets will be routed to random `jvb`, which would not allow for a working video setup.
Expand Down Expand Up @@ -123,9 +130,13 @@ Parameter | Description | Default
`jicofo.xmpp.user` | Name of the XMPP user used by jicofo to authenticate | `focus`
`jicofo.xmpp.password` | Password used by jicofo to authenticate on the XMPP service | 10 random chars
`jicofo.xmpp.componentSecret` | Values of the secret used by jicofo for the xmpp-component | 10 random chars
`jvb.publicIPs` | List of IP addresses for JVB to announce to clients | `(unset)`
`jvb.service.enabled` | Boolean to enable os disable the jvb service creation | `false` if `jvb.useHostPort` is `true` otherwise `true`
`jvb.service.type` | Type of the jvb service | `ClusterIP`
`jvb.UDPPort` | UDP port used by jvb, also affects port of service, and hostPort | `10000`
`jvb.nodePort` | UDP port used by NodePort service | `(unset)`
`jvb.useHostPort` | Enable HostPort feature (may not work on some CNI plugins) | `false`
`jvb.useHostNetwork` | Connect JVB pod to host network namespace | `false`
`jvb.extraEnvs` | Map containing additional environment variables to jvb | '{}'
`jvb.xmpp.user` | Name of the XMPP user used by jvb to authenticate | `jvb`
`jvb.xmpp.password` | Password used by jvb to authenticate on the XMPP service | 10 random chars
Expand Down
10 changes: 5 additions & 5 deletions templates/jvb/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -57,18 +57,18 @@ spec:
- configMapRef:
name: {{ include "jitsi-meet.jvb.fullname" . }}
env:
{{- if or .Values.jvb.useNodeIP .Values.jvb.publicIP }}
{{- if or .Values.jvb.useNodeIP .Values.jvb.publicIPs }}
- name: DOCKER_HOST_ADDRESS
{{- if .Values.jvb.publicIP }}
value: {{ .Values.jvb.publicIP }}
{{- if .Values.jvb.publicIPs }}
value: {{ first .Values.jvb.publicIPs }}
{{- else }}
valueFrom:
fieldRef:
fieldPath: status.hostIP
{{- end }}
- name: JVB_ADVERTISE_IPS
{{- if .Values.jvb.publicIP }}
value: {{ .Values.jvb.publicIP }}
{{- if .Values.jvb.publicIPs }}
value: {{ .Values.jvb.publicIPs | join "," }}
{{- else }}
valueFrom:
fieldRef:
Expand Down
2 changes: 1 addition & 1 deletion templates/jvb/metrics-service.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,4 @@ spec:
name: tcp-metrics
selector:
{{- include "jitsi-meet.jvb.selectorLabels" . | nindent 4 }}
{{- end }}
{{- end }}
2 changes: 1 addition & 1 deletion templates/jvb/service.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{{- if or (and (kindIs "invalid" .Values.jvb.service.enabled) (not .Values.jvb.useHostPort)) .Values.jvb.service.enabled }}
{{- if or (and (kindIs "invalid" .Values.jvb.service.enabled) (not (or .Values.jvb.useHostPort .Values.jvb.useHostNetwork))) .Values.jvb.service.enabled }}
apiVersion: v1
kind: Service
metadata:
Expand Down
12 changes: 12 additions & 0 deletions values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -161,6 +161,17 @@ jvb:
user: jvb
password:

## Set public IP addresses to be advertised by JVB.
# You can specify your nodes' IP addresses,
# or IP addresses of proxies/LoadBalancers used for your
# Jitsi Meet installation. Or both!
#
# Note that only the first IP address will be used for legacy
# `DOCKER_HOST_ADDRESS` environment variable.
#
# publicIPs:
# - 1.2.3.4
# - 5.6.7.8
## Use a STUN server to help some users punch through some
# especially nasty NAT setups. Usually makes sense for P2P calls.
stunServers: 'meet-jit-si-turnrelay.jitsi.net:443'
Expand All @@ -170,6 +181,7 @@ jvb:
## Use host's network namespace:
# (not recommended, but might help for some cases)
useHostNetwork: false
## UDP transport port:
UDPPort: 10000
## Use a pre-defined external port for NodePort or LoadBalancer service,
# if needed. Will allocate a random port from allowed range if unset.
Expand Down

0 comments on commit 73d6143

Please sign in to comment.