first commit
This commit is contained in:
7
k8s/livekit/Dockerfile
Normal file
7
k8s/livekit/Dockerfile
Normal file
@@ -0,0 +1,7 @@
|
||||
FROM livekit/livekit-server:v1.11.0
|
||||
|
||||
COPY livekit.yaml /etc/livekit/livekit.yaml
|
||||
|
||||
EXPOSE 7880 7881 7882
|
||||
|
||||
CMD ["--config", "/etc/livekit/livekit.yaml"]
|
||||
19
k8s/livekit/configmap.yaml
Normal file
19
k8s/livekit/configmap.yaml
Normal file
@@ -0,0 +1,19 @@
|
||||
apiVersion: v1
|
||||
kind: ConfigMap
|
||||
metadata:
|
||||
name: ${APP_NAME}-livekit-config
|
||||
namespace: ${K8S_NAMESPACE}
|
||||
data:
|
||||
livekit.yaml: |
|
||||
port: 7880
|
||||
log_level: warn
|
||||
rtc:
|
||||
tcp_port: 7881
|
||||
udp_port: 7882
|
||||
port_range_start: 50000
|
||||
port_range_end: 60000
|
||||
redis:
|
||||
address: "${REDIS_HOST}:6379"
|
||||
use_tls: true
|
||||
keys:
|
||||
tia_livek_tia_api_key: "TiaLivekitSecret2026KeyBridgeSync01"
|
||||
100
k8s/livekit/deployment.yaml
Normal file
100
k8s/livekit/deployment.yaml
Normal file
@@ -0,0 +1,100 @@
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
name: ${APP_NAME}-livekit
|
||||
namespace: ${K8S_NAMESPACE}
|
||||
labels:
|
||||
app: ${APP_NAME}-livekit
|
||||
app.kubernetes.io/name: tia-livekit
|
||||
app.kubernetes.io/part-of: tia
|
||||
spec:
|
||||
replicas: ${LIVEKIT_REPLICAS}
|
||||
strategy:
|
||||
type: Recreate
|
||||
selector:
|
||||
matchLabels:
|
||||
app: ${APP_NAME}
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
app: ${APP_NAME}
|
||||
app.kubernetes.io/name: tia-livekit
|
||||
app.kubernetes.io/part-of: tia
|
||||
spec:
|
||||
hostAliases:
|
||||
- ip: ${REDIS_IP}
|
||||
hostnames:
|
||||
- ${REDIS_HOST}
|
||||
securityContext:
|
||||
runAsNonRoot: true
|
||||
runAsUser: 1000
|
||||
runAsGroup: 1000
|
||||
fsGroup: 1000
|
||||
volumes:
|
||||
- name: config-volume
|
||||
configMap:
|
||||
name: ${APP_NAME}-livekit-config
|
||||
containers:
|
||||
- name: ${APP_NAME}-livekit
|
||||
image: ${IMAGE_REPOSITORY_LIVEKIT}:${IMAGE_TAG}
|
||||
imagePullPolicy: IfNotPresent
|
||||
args:
|
||||
- "--config"
|
||||
- "/etc/livekit/livekit.yaml"
|
||||
envFrom:
|
||||
- secretRef:
|
||||
name: ${APP_NAME}-api-secrets
|
||||
volumeMounts:
|
||||
- name: config-volume
|
||||
mountPath: /etc/livekit
|
||||
readOnly: true
|
||||
ports:
|
||||
- name: signal
|
||||
containerPort: 7880
|
||||
- name: rtc-tcp
|
||||
containerPort: 7881
|
||||
- name: rtc-udp
|
||||
containerPort: 7882
|
||||
protocol: UDP
|
||||
readinessProbe:
|
||||
tcpSocket:
|
||||
port: 7880
|
||||
initialDelaySeconds: 20
|
||||
periodSeconds: 10
|
||||
timeoutSeconds: 5
|
||||
failureThreshold: 3
|
||||
livenessProbe:
|
||||
tcpSocket:
|
||||
port: 7880
|
||||
initialDelaySeconds: 30
|
||||
periodSeconds: 20
|
||||
timeoutSeconds: 5
|
||||
failureThreshold: 3
|
||||
resources:
|
||||
requests:
|
||||
cpu: "${CPU_LIVEKIT_REQ}"
|
||||
memory: "${MEM_LIVEKIT_REQ}"
|
||||
limits:
|
||||
cpu: "${CPU_LIVEKIT_LIM}"
|
||||
memory: "${MEM_LIVEKIT_LIM}"
|
||||
---
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
name: ${APP_NAME}-livekit
|
||||
namespace: ${K8S_NAMESPACE}
|
||||
spec:
|
||||
type: NodePort
|
||||
selector:
|
||||
app.kubernetes.io/name: tia-livekit
|
||||
ports:
|
||||
- name: signal
|
||||
port: 7880
|
||||
targetPort: 7880
|
||||
- name: rtc-tcp
|
||||
port: 7881
|
||||
targetPort: 7881
|
||||
- name: rtc-udp
|
||||
port: 7882
|
||||
targetPort: 7882
|
||||
protocol: UDP
|
||||
Reference in New Issue
Block a user