大量更新

This commit is contained in:
zeaslity
2026-05-19 14:28:44 +08:00
parent a8f6bda703
commit 9fc3372fa3
5299 changed files with 423176 additions and 426690 deletions

View File

@@ -0,0 +1,41 @@
1. 获取应用的 URL:
NOTE: It may take a few minutes for all pods to be ready.
查看 Pod 状态:
kubectl get pods -n {{ .Release.Namespace }} -l release={{ .Release.Name }}
2. Media Suite (WVP + ZLM + ZLM-OSS) 使用 HostNetwork 模式访问nodeIp+端口:
- WVP HTTP: http://{{.Values.mediaSuite.nodeIP}}:{{ .Values.wvp.ports.http }}
- WVP SIP: {{.Values.mediaSuite.nodeIP}}:{{ .Values.wvp.ports.sip }}/UDP
- ZLM HTTP: http://{{.Values.mediaSuite.nodeIP}}:{{ .Values.zlm.ports.http }}
- ZLM HTTPS: https://{{.Values.mediaSuite.nodeIP}}:{{ .Values.zlm.ports.https }}
- ZLM RTMP: rtmp://{{.Values.mediaSuite.nodeIP}}:{{ .Values.zlm.ports.rtmp }}
- ZLM RTSP: rtsp://{{.Values.mediaSuite.nodeIP}}:{{ .Values.zlm.ports.rtsp }}
- ZLM WebRTC: webrtc://{{.Values.mediaSuite.nodeIP}}:{{ .Values.zlm.ports.webrtc }}
- ZLM SRT: srt://{{.Values.mediaSuite.nodeIP}}:{{ .Values.zlm.ports.srt }}
- ZLM-OSS: http://{{.Values.mediaSuite.nodeIP}}:{{ .Values.zlmOss.port }}
3. Live Operator:
- URL: http://<NODE_IP>:{{ .Values.network.liveOpNodePort }}
4. Live Proxy:
- URL: http://<NODE_IP>:{{ .Values.network.liveProxyNodePort }}
5. Live Helper:
- URL: http://<NODE_IP>:{{ .Values.network.liveHelperNodePort }}
6. 查看日志:
# Media Suite (所有容器)
kubectl logs -f deployment/{{ .Release.Name }}-media-suite -n {{ .Release.Namespace }} -c wvp
kubectl logs -f deployment/{{ .Release.Name }}-media-suite -n {{ .Release.Namespace }} -c zlm
kubectl logs -f deployment/{{ .Release.Name }}-media-suite -n {{ .Release.Namespace }} -c zlm-oss
# Live Operator
kubectl logs -f deployment/{{ .Release.Name }}-live-op -n {{ .Release.Namespace }}
# Live Proxy
kubectl logs -f deployment/{{ .Release.Name }}-live-proxy -n {{ .Release.Namespace }}
# Live Helper
kubectl logs -f deployment/{{ .Release.Name }}-live-helper -n {{ .Release.Namespace }}
7. 卸载:
helm uninstall {{ .Release.Name }} -n {{ .Release.Namespace }}

View File

@@ -0,0 +1,13 @@
{{- if .Values.images.secretName }}
apiVersion: v1
kind: Secret
metadata:
name: {{ .Values.images.secretName }}
namespace: {{ .Release.Namespace }}
labels:
chart: {{ .Chart.Name }}-{{ .Chart.Version }}
release: {{ .Release.Name }}
type: kubernetes.io/dockerconfigjson
data:
.dockerconfigjson: {{ .Values.images.dockerConfigJson }}
{{- end }}

View File

@@ -0,0 +1,22 @@
apiVersion: v1
kind: ConfigMap
metadata:
namespace: {{ .Release.Namespace }}
name: {{ .Release.Name }}-live-helper-config
labels:
app: live-helper
chart: {{ .Chart.Name }}-{{ .Chart.Version }}
release: {{ .Release.Name }}
data:
config.yaml: |
app:
port: {{ .Values.liveHelper.port }}
workers: 4
log:
level: INFO
client:
zlm: "http://{{ .Release.Name }}-zlm:{{ .Values.zlm.ports.http }}"
downloader:
allow_domains: {{ .Values.liveHelper.allowDownload }}

View File

@@ -0,0 +1,65 @@
apiVersion: apps/v1
kind: Deployment
metadata:
namespace: {{ .Release.Namespace }}
name: {{ .Release.Name }}-live-helper
labels:
app: live-helper
chart: {{ .Chart.Name }}-{{ .Chart.Version }}
release: {{ .Release.Name }}
spec:
replicas: {{ .Values.liveHelper.replicaCount }}
selector:
matchLabels:
app: live-helper
release: {{ .Release.Name }}
template:
metadata:
labels:
app: live-helper
release: {{ .Release.Name }}
spec:
containers:
- name: live-helper
image: "{{ .Values.images.liveHelper.repository }}:{{ .Values.images.liveHelper.tag }}"
imagePullPolicy: {{ .Values.images.liveHelper.pullPolicy }}
ports:
- name: http
containerPort: {{ .Values.liveHelper.port }}
protocol: TCP
env:
- name: ALLOW_DOWNLOAD
value: "{{ .Values.liveHelper.allowDownload }}"
volumeMounts:
- name: config
mountPath: /cmii/live-helper/config.yaml
subPath: config.yaml
resources:
{{- toYaml .Values.liveHelper.resources | nindent 12 }}
volumes:
- name: config
configMap:
name: {{ .Release.Name }}-live-helper-config
imagePullSecrets:
- name: {{ .Values.images.secretName }}
---
apiVersion: v1
kind: Service
metadata:
namespace: {{ .Release.Namespace }}
name: {{ .Release.Name }}-live-helper
labels:
app: live-helper
chart: {{ .Chart.Name }}-{{ .Chart.Version }}
release: {{ .Release.Name }}
spec:
type: NodePort
ports:
- name: http
port: {{ .Values.liveHelper.port }}
targetPort: http
nodePort: {{ .Values.network.liveHelperNodePort }}
protocol: TCP
selector:
app: live-helper
release: {{ .Release.Name }}

View File

@@ -0,0 +1,86 @@
apiVersion: v1
kind: ConfigMap
metadata:
namespace: {{ .Release.Namespace }}
name: {{ .Release.Name }}-live-op-config
labels:
app: live-op
chart: {{ .Chart.Name }}-{{ .Chart.Version }}
release: {{ .Release.Name }}
data:
application.yaml: |
debug: false
server:
port: {{ .Values.liveOp.port }}
spring:
web:
resources:
static-locations: classpath:/static/
main:
allow-bean-definition-overriding: true
allow-circular-references: true
application:
name: cmii-live-operator
thymeleaf:
check-template-location: false
cache: false
platform:
info:
name: cmii-live-operator
description: cmii-live-operator
version: 5.8.0
scanPackage: com.cmii.live.op
jackson:
time-zone: GMT+8
mvc:
pathmatch:
matching-strategy: ANT_PATH_MATCHER
datasource:
driver-class-name: com.mysql.cj.jdbc.Driver
type: com.alibaba.druid.pool.DruidDataSource
url: jdbc:mysql://{{ .Values.external.database.host }}:{{ .Values.external.database.port }}/{{ .Values.databases.liveOp }}?characterEncoding=utf8&useSSL=false&serverTimezone=GMT%2B8&allowPublicKeyRetrieval=true
username: {{ .Values.external.database.username }}
password: {{ .Values.external.database.password }}
druid:
initial-size: 10
min-idle: 5
max-active: 20
max-wait: 60000
time-between-eviction-runs-millis: 60000
min-evictable-idle-time-millis: 300000
validation-query: SELECT 1
test-while-idle: true
test-on-borrow: false
test-on-return: false
use-ping-method: false
keep-alive: true
redis:
host: {{ .Values.external.redis.host }}
port: {{ .Values.external.redis.port }}
database: {{ .Values.redis.liveOpDb }}
password: {{ .Values.external.redis.password }}
live:
sync:
pool:
monitor:
enabled: false
core: 10
max: 20
queue: 1
keepalive: 20
logging:
config: classpath:logback-operator.xml
level:
root: info
com.cmii.live.op.mapper: info
mybatis-plus:
global-config:
banner: false
knife4j:
enable: true

View File

@@ -0,0 +1,97 @@
apiVersion: apps/v1
kind: Deployment
metadata:
namespace: {{ .Release.Namespace }}
name: {{ .Release.Name }}-live-op
labels:
app: live-op
chart: {{ .Chart.Name }}-{{ .Chart.Version }}
release: {{ .Release.Name }}
spec:
replicas: {{ .Values.liveOp.replicaCount }}
selector:
matchLabels:
app: live-op
release: {{ .Release.Name }}
template:
metadata:
labels:
app: live-op
release: {{ .Release.Name }}
spec:
containers:
- name: live-op
image: "{{ .Values.images.liveOp.repository }}:{{ .Values.images.liveOp.tag }}"
imagePullPolicy: {{ .Values.images.liveOp.pullPolicy }}
ports:
- name: http
containerPort: {{ .Values.liveOp.port }}
protocol: TCP
env:
- name: LIVE_IP_PUBLIC
value: "{{ .Values.mediaSuite.nodeIP }}"
- name: LIVE_IP_PRIVATE
value: "{{ .Values.mediaSuite.nodeIP }}"
- name: LIVE_OP_PORT_HTTP
value: "{{ .Values.liveOp.port }}"
- name: LIVE_WVP_PORT_HTTP
value: "{{ .Values.wvp.ports.http }}"
- name: LIVE_ZLM_PORT_HTTP
value: "{{ .Values.zlm.ports.http }}"
- name: LIVE_ZLM_PORT_HTTPS
value: "{{ .Values.zlm.ports.https }}"
- name: LIVE_ZLM_PORT_RTMP
value: "{{ .Values.zlm.ports.rtmp }}"
- name: LIVE_ZLM_PORT_RTSP
value: "{{ .Values.zlm.ports.rtsp }}"
- name: LIVE_ZLM_PORT_SRT
value: "{{ .Values.zlm.ports.srt }}"
- name: LIVE_ZLM_API_PASSWD
value: "{{ .Values.zlm.apiPasswd }}"
- name: OSS_ENDPOINT
value: "{{ .Values.external.minio.endpoint }}"
- name: OSS_AK
value: "{{ .Values.external.minio.accessKey }}"
- name: OSS_SK
value: "{{ .Values.external.minio.secretKey }}"
- name: RABBITMQ_HOST
value: "{{ .Values.external.rabbitmq.host }}"
- name: RABBITMQ_USERNAME
value: "{{ .Values.external.rabbitmq.username }}"
- name: RABBITMQ_PASSWORD
value: "{{ .Values.external.rabbitmq.password }}"
- name: RABBITMQ_PORT
value: "{{ .Values.external.rabbitmq.port }}"
volumeMounts:
- name: config
mountPath: /cmii/application.yaml
subPath: application.yaml
resources:
{{- toYaml .Values.liveOp.resources | nindent 12 }}
volumes:
- name: config
configMap:
name: {{ .Release.Name }}-live-op-config
imagePullSecrets:
- name: {{ .Values.images.secretName }}
---
apiVersion: v1
kind: Service
metadata:
namespace: {{ .Release.Namespace }}
name: {{ .Release.Name }}-live-op
labels:
app: live-op
chart: {{ .Chart.Name }}-{{ .Chart.Version }}
release: {{ .Release.Name }}
spec:
type: NodePort
ports:
- name: http
port: {{ .Values.liveOp.port }}
targetPort: http
nodePort: {{ .Values.network.liveOpNodePort }}
protocol: TCP
selector:
app: live-op
release: {{ .Release.Name }}

View File

@@ -0,0 +1,102 @@
apiVersion: v1
kind: ConfigMap
metadata:
name: {{ .Release.Name }}-live-proxy-config
labels:
app: live-proxy
chart: {{ .Chart.Name }}-{{ .Chart.Version }}
release: {{ .Release.Name }}
data:
application.yaml: |
server:
port: {{ .Values.liveProxy.port }}
live:
proxy:
ffmpeg:
ffmpeg-path: /usr/bin/ffmpeg
ffprobe-path: /usr/bin/ffprobe
ffplay-path: /usr/bin/ffplay
check-win-pid: tasklist /FI "PID eq %s " /FO LIST
check-unix-pid: ps -p %s
os-name: windows
upload:
path: /proxy/uploads
src-all-size: 4294967296
dest-all-size: 4294967296
ws:
url: "{{ .Values.mediaSuite.nodeIP }}:{{ .Values.network.liveProxyNodePort }}"
minio:
endpoint: {{ .Values.external.minio.endpoint }}
access-key: {{ .Values.external.minio.accessKey }}
secret-key: {{ .Values.external.minio.secretKey }}
bucket-name: ilm-detect
spring:
platform:
info:
name: cmii-live-proxy
description: ffmpeg服务小工具
version: 1.0.3
scanPackage: com.cmii.live.proxy.web.controller
profiles:
active: local
jackson:
time-zone: GMT+8
mvc:
pathmatch:
matching-strategy: ANT_PATH_MATCHER
thymeleaf:
check-template-location: false
cache: false
servlet:
multipart:
max-file-size: 1024MB
max-request-size: 1024MB
datasource:
driver-class-name: com.mysql.cj.jdbc.Driver
type: com.alibaba.druid.pool.DruidDataSource
druid:
url: jdbc:mysql://{{ .Values.external.database.host }}:{{ .Values.external.database.port }}/{{ .Values.databases.proxy }}?characterEncoding=utf8&useSSL=false&serverTimezone=GMT%2B8&allowPublicKeyRetrieval=true
username: {{ .Values.external.database.username }}
password: {{ .Values.external.database.password }}
initial-size: 5
min-idle: 5
max-active: 20
max-wait: 60000
time-between-eviction-runs-millis: 60000
min-evictable-idle-time-millis: 300000
max-evictable-idle-time-millis: 600000
validation-query: SELECT 1
test-while-idle: true
test-on-borrow: false
test-on-return: false
filters: stat,wall,slf4j
connection-properties: connectTimeout=10000;socketTimeout=30000
redis:
host: {{ .Values.external.redis.host }}
port: {{ .Values.external.redis.port }}
password: {{ .Values.external.redis.password }}
database: {{ .Values.redis.proxyDb }}
timeout: 10s
lettuce:
pool:
min-idle: 0
max-idle: 10
max-active: 10
max-wait: -1ms
springdoc:
api-docs:
enabled: true
swagger-ui:
enabled: true
mybatis-plus:
global-config:
banner: false
logging:
config: classpath:logback-proxy.xml
level:
com.cmii.live.proxy.web.mapper: info

View File

@@ -0,0 +1,81 @@
apiVersion: apps/v1
kind: Deployment
metadata:
namespace: {{ .Release.Namespace }}
name: {{ .Release.Name }}-live-proxy
labels:
app: live-proxy
chart: {{ .Chart.Name }}-{{ .Chart.Version }}
release: {{ .Release.Name }}
spec:
replicas: {{ .Values.liveProxy.replicaCount }}
selector:
matchLabels:
app: live-proxy
release: {{ .Release.Name }}
template:
metadata:
labels:
app: live-proxy
release: {{ .Release.Name }}
spec:
containers:
- name: live-proxy
image: "{{ .Values.images.liveProxy.repository }}:{{ .Values.images.liveProxy.tag }}"
imagePullPolicy: {{ .Values.images.liveProxy.pullPolicy }}
ports:
- name: http
containerPort: {{ .Values.liveProxy.port }}
protocol: TCP
env:
- name: LIVE_IP_PRIVATE
value: "{{ .Values.mediaSuite.nodeIP }}"
- name: LIVE_ZLM_PORT_HTTP
value: "{{ .Values.zlm.ports.http }}"
- name: LIVE_ZLM_PORT_HTTPS
value: "{{ .Values.zlm.ports.https }}"
- name: LIVE_ZLM_PORT_RTMP
value: "{{ .Values.zlm.ports.rtmp }}"
- name: LIVE_ZLM_PORT_RTSP
value: "{{ .Values.zlm.ports.rtsp }}"
- name: LIVE_OP_PORT_HTTP
value: "{{ .Values.network.liveOpNodePort }}"
volumeMounts:
- name: config
mountPath: /proxy/application.yaml
subPath: application.yaml
- name: shared-data
mountPath: /cmii/uploads
subPath: uploads
resources:
{{- toYaml .Values.liveProxy.resources | nindent 12 }}
volumes:
- name: config
configMap:
name: {{ .Release.Name }}-live-proxy-config
- name: shared-data
persistentVolumeClaim:
claimName: {{ .Release.Name }}-shared-data-pvc
imagePullSecrets:
- name: {{ .Values.images.secretName }}
---
apiVersion: v1
kind: Service
metadata:
namespace: {{ .Release.Namespace }}
name: {{ .Release.Name }}-live-proxy
labels:
app: live-proxy
chart: {{ .Chart.Name }}-{{ .Chart.Version }}
release: {{ .Release.Name }}
spec:
type: NodePort
ports:
- name: http
port: {{ .Values.liveProxy.port }}
targetPort: http
nodePort: {{ .Values.network.liveProxyNodePort }}
protocol: TCP
selector:
app: live-proxy
release: {{ .Release.Name }}

View File

@@ -0,0 +1,156 @@
apiVersion: apps/v1
kind: Deployment
metadata:
namespace: {{ .Release.Namespace }}
name: {{ .Release.Name }}-media-suite
labels:
app: media-suite
chart: {{ .Chart.Name }}-{{ .Chart.Version }}
release: {{ .Release.Name }}
spec:
replicas: {{ .Values.mediaSuite.replicaCount }}
selector:
matchLabels:
app: media-suite
release: {{ .Release.Name }}
template:
metadata:
labels:
app: media-suite
release: {{ .Release.Name }}
spec:
hostNetwork: true
dnsPolicy: ClusterFirstWithHostNet
# 配置到固定node上
nodeSelector:
{{- range $key, $value := .Values.mediaSuite.nodeSelector }}
{{ $key }}: {{ $value | quote }}
{{- end }}
containers:
# WVP Container
- name: wvp
image: "{{ .Values.images.wvp.repository }}:{{ .Values.images.wvp.tag }}"
imagePullPolicy: {{ .Values.images.wvp.pullPolicy }}
ports:
- name: wvp-http
containerPort: {{ .Values.wvp.ports.http }}
hostPort: {{ .Values.wvp.ports.http }}
protocol: TCP
- name: wvp-sip
containerPort: {{ .Values.wvp.ports.sip }}
hostPort: {{ .Values.wvp.ports.sip }}
protocol: UDP
env:
- name: TZ
value: "Asia/Shanghai"
- name: NODE_IP
valueFrom:
fieldRef:
fieldPath: status.hostIP
- name: POD_IP
valueFrom:
fieldRef:
fieldPath: status.hostIP
volumeMounts:
- name: wvp-config
mountPath: /home/koisi/wvp.yaml
subPath: application.yaml
resources:
{{- toYaml .Values.wvp.resources | nindent 12 }}
# ZLM Container
- name: zlm
image: "{{ .Values.images.zlm.repository }}:{{ .Values.images.zlm.tag }}"
imagePullPolicy: {{ .Values.images.zlm.pullPolicy }}
ports:
- name: zlm-http
containerPort: {{ .Values.zlm.ports.http }}
hostPort: {{ .Values.zlm.ports.http }}
protocol: TCP
- name: zlm-https
containerPort: {{ .Values.zlm.ports.https }}
hostPort: {{ .Values.zlm.ports.https }}
protocol: TCP
- name: zlm-rtmp
containerPort: {{ .Values.zlm.ports.rtmp }}
hostPort: {{ .Values.zlm.ports.rtmp }}
protocol: TCP
- name: zlm-rtsp
containerPort: {{ .Values.zlm.ports.rtsp }}
hostPort: {{ .Values.zlm.ports.rtsp }}
protocol: TCP
- name: zlm-webrtc-tcp
containerPort: {{ .Values.zlm.ports.webrtc }}
hostPort: {{ .Values.zlm.ports.webrtc }}
protocol: TCP
- name: zlm-webrtc-udp
containerPort: {{ .Values.zlm.ports.webrtc }}
hostPort: {{ .Values.zlm.ports.webrtc }}
protocol: UDP
- name: zlm-srt
containerPort: {{ .Values.zlm.ports.srt }}
hostPort: {{ .Values.zlm.ports.srt }}
protocol: TCP
- name: zlm-rtp-proxy
containerPort: {{ .Values.zlm.ports.rtpProxy }}
hostPort: {{ .Values.zlm.ports.rtpProxy }}
protocol: UDP
{{- range $i := untilStep (int .Values.zlm.ports.rtpMin) (int (add1 .Values.zlm.ports.rtpMax)) 1 }}
- name: zlm-rtp-{{ $i }}
containerPort: {{ $i }}
hostPort: {{ $i }}
protocol: UDP
{{- end }}
env:
- name: TZ
value: "Asia/Shanghai"
- name: NODE_IP
valueFrom:
fieldRef:
fieldPath: status.hostIP
- name: POD_IP
valueFrom:
fieldRef:
fieldPath: status.hostIP
volumeMounts:
- name: zlm-config
mountPath: /home/koisi/zlm.ini
subPath: zlm.ini
- name: shared-data
mountPath: /home/koisi/zlm/www/zlm/hls
subPath: hls
resources:
{{- toYaml .Values.zlm.resources | nindent 12 }}
# ZLM-OSS Container
- name: zlm-oss
image: "{{ .Values.images.zlmOss.repository }}:{{ .Values.images.zlmOss.tag }}"
imagePullPolicy: {{ .Values.images.zlmOss.pullPolicy }}
ports:
- name: zlm-oss-http
containerPort: {{ .Values.zlmOss.port }}
hostPort: {{ .Values.zlmOss.port }}
protocol: TCP
volumeMounts:
- name: zlm-oss-config
mountPath: /cmii/oss-adaptor/boot/config.yaml
subPath: config.yaml
- name: shared-data
mountPath: /cmii/share/hls
subPath: hls
resources:
{{- toYaml .Values.zlmOss.resources | nindent 12 }}
volumes:
- name: wvp-config
configMap:
name: {{ .Release.Name }}-wvp-config
- name: zlm-config
configMap:
name: {{ .Release.Name }}-zlm-config
- name: zlm-oss-config
configMap:
name: {{ .Release.Name }}-zlm-oss-config
- name: shared-data
persistentVolumeClaim:
claimName: {{ .Release.Name }}-shared-data-pvc
imagePullSecrets:
- name: {{ .Values.images.secretName }}

View File

@@ -0,0 +1,19 @@
# 单个共享 PVC通过 subPath 区分不同服务的数据
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
namespace: {{ .Release.Namespace }}
name: {{ .Release.Name }}-shared-data-pvc
labels:
app: media-suite
chart: {{ .Chart.Name }}-{{ .Chart.Version }}
release: {{ .Release.Name }}
spec:
accessModes:
- ReadWriteMany
resources:
requests:
storage: 10Gi
{{- if .Values.persistence.shared.storageClass }}
storageClassName: {{ .Values.persistence.shared.storageClass }}
{{- end }}

View File

@@ -0,0 +1,96 @@
apiVersion: v1
kind: ConfigMap
metadata:
namespace: {{ .Release.Namespace }}
name: {{ .Release.Name }}-wvp-config
labels:
app: wvp
chart: {{ .Chart.Name }}-{{ .Chart.Version }}
release: {{ .Release.Name }}
data:
application.yaml: |
spring:
cache:
type: redis
thymeleaf:
cache: false
mvc:
async:
request-timeout: 20000
servlet:
multipart:
max-file-size: 10MB
max-request-size: 100MB
data:
redis:
host: {{ .Values.external.redis.host }}
port: {{ .Values.external.redis.port }}
database: {{ .Values.redis.wvpDb }}
password: {{ .Values.external.redis.password }}
timeout: 10000
datasource:
type: com.zaxxer.hikari.HikariDataSource
driver-class-name: com.mysql.cj.jdbc.Driver
url: jdbc:mysql://{{ .Values.external.database.host }}:{{ .Values.external.database.port }}/{{ .Values.databases.wvp }}?useUnicode=true&characterEncoding=UTF8&rewriteBatchedStatements=true&serverTimezone=PRC&useSSL=false&allowMultiQueries=true&allowPublicKeyRetrieval=true
username: {{ .Values.external.database.username }}
password: {{ .Values.external.database.password }}
server:
port: {{ .Values.wvp.ports.http }}
ssl:
enabled: false
sip:
ip: ${NODE_IP}
show-ip: ${NODE_IP}
port: {{ .Values.wvp.ports.sip }}
domain: {{ .Values.wvp.sip.domain }}
id: "{{ .Values.wvp.sip.id }}"
password: {{ .Values.zlm.apiPasswd }}
register-time-interval: 60
ptz-speed: 50
keepalliveToOnline: true
alarm: true
timeout: 1000
media:
id: {{ .Values.zlm.nodeId }}
ip: 127.0.0.1
http-port: {{ .Values.zlm.ports.http }}
http-ssl-port: 0
flv-port: {{ .Values.zlm.ports.http }}
flv-ssl-port: {{ .Values.zlm.ports.https }}
ws-flv-port: {{ .Values.zlm.ports.http }}
ws-flv-ssl-port: {{ .Values.zlm.ports.https }}
rtp-proxy-port: {{ .Values.zlm.ports.http }}
rtmp-port: {{ .Values.zlm.ports.https }}
rtmp-ssl-port: 0
rtsp-port: {{ .Values.zlm.ports.rtsp }}
rtsp-ssl-port: 0
auto-config: false
secret: {{ .Values.zlm.apiPasswd }}
rtp:
enable: true
port-range: {{ .Values.zlm.ports.rtpMin }},{{ .Values.zlm.ports.rtpMax }}
send-port-range: 30800,30990
record-path: /opt/media/bin/www/record/
record-day: 7
record-assist-port: 0
user-settings:
auto-apply-play: true
play-timeout: 30000
wait-track: false
record-push-live: false
record-sip: true
stream-on-demand: true
interface-authentication: true
broadcast-for-platform: TCP-PASSIVE
push-stream-after-ack: true
send-to-platforms-when-id-lost: true
interface-authentication-excludes:
- /api/**
push-authority: true
logging:
config: classpath:logback-spring.xml

View File

@@ -0,0 +1,211 @@
apiVersion: v1
kind: ConfigMap
metadata:
namespace: {{ .Release.Namespace }}
name: {{ .Release.Name }}-zlm-config
labels:
app: zlm
chart: {{ .Chart.Name }}-{{ .Chart.Version }}
release: {{ .Release.Name }}
data:
zlm.ini: |
[api]
apiDebug = 0
secret = {{ .Values.zlm.apiPasswd }}
snapRoot = ./www/snap/
defaultSnap = ./www/logo.png
downloadRoot = ./www
[ffmpeg]
bin = /usr/bin/ffmpeg
cmd = %s -re -i %s -c:a aac -strict -2 -ar 44100 -ab 48k -c:v libx264 -f flv %s
log = ./ffmpeg/ffmpeg.log
restart_sec = 0
snap = %s -rtsp_transport tcp -i %s -y -f mjpeg -frames:v 1 %s
[protocol]
modify_stamp = 2
enable_audio = 1
add_mute_audio = 0
auto_close = 0
continue_push_ms = 3000
paced_sender_ms = 0
enable_hls = 1
enable_hls_fmp4 = 0
enable_rtmp = 1
enable_ts = 1
enable_fmp4 = 1
enable_rtsp = 1
enable_mp4 = 0
mp4_as_player = 0
mp4_max_second = 3600
mp4_save_path = ./www
hls_save_path = ./www/zlm/hls
hls_demand = 0
rtsp_demand = 0
rtmp_demand = 0
ts_demand = 0
fmp4_demand = 0
[general]
enableVhost = 0
flowThreshold = 1024
enable_ffmpeg_log = 0
listen_ip = ::
maxStreamWaitMS = 0
streamNoneReaderDelayMS = 120000
resetWhenRePlay = 1
mergeWriteMS = 0
mediaServerId = {{ .Values.zlm.nodeId }}
wait_audio_track_data_ms = 1000
wait_track_ready_ms = 8000
wait_add_track_ms = 2000
unready_frame_cache = 96
check_nvidia_dev = 1
broadcast_player_count_changed = 0
[hls]
fileBufSize = 65536
segDur = 10
segNum = 3
segDelay = 0
segRetain = 5
broadcastRecordTs = 1
deleteDelaySec = 10
segKeep = 0
fastRegister = 0
[hook]
enable = 1
on_flow_report =
on_http_access =
# ZLM → Live Operator
on_play = http://{{ .Release.Name }}-live-op:{{ .Values.liveOp.port }}/hooks/on_play
on_publish = http://{{ .Release.Name }}-live-op:{{ .Values.liveOp.port }}/hooks/on_push
on_stream_changed = http://{{ .Release.Name }}-live-op:{{ .Values.liveOp.port }}/hooks/on_stream_changed
# ZLM → WVP
on_stream_none_reader = http://127.0.0.1:{{ .Values.wvp.ports.http }}/index/hook/on_stream_none_reader
on_stream_not_found = http://127.0.0.1:{{ .Values.wvp.ports.http }}/index/hook/on_stream_not_found
on_rtp_server_timeout = http://127.0.0.1:{{ .Values.wvp.ports.http }}/index/hook/on_rtp_server_timeout
on_send_rtp_stopped = http://127.0.0.1:{{ .Values.wvp.ports.http }}/index/hook/on_send_rtp_stopped
on_server_started = http://127.0.0.1:{{ .Values.wvp.ports.http }}/index/hook/on_server_started
on_server_keepalive = http://127.0.0.1:{{ .Values.wvp.ports.http }}/index/hook/on_server_keepalive
on_record_mp4 = http://127.0.0.1:{{ .Values.wvp.ports.http }}/index/hook/on_record_mp4
on_server_exited =
on_rtsp_auth =
on_rtsp_realm =
on_shell_login =
# ZLM → ZLM OSS
on_record_ts = http://127.0.0.1:{{ .Values.zlmOss.port }}/hooks/on_record_ts
stream_changed_schemas = rtsp/rtmp/fmp4/ts/hls/hls.fmp4
timeoutSec = 30
alive_interval = 10.0
retry = 1
retry_delay = 3.0
[cluster]
origin_url =
timeout_sec = 15
retry_count = 3
[http]
port = {{ .Values.zlm.ports.http }}
sslport = {{ .Values.zlm.ports.https }}
charSet = utf-8
keepAliveSecond = 30
maxReqSize = 40960
notFound = <html><head><title>404 Not Found</title></head><body><div>404 Not Found</div></body></html>
rootPath = ./www
sendBufSize = 65536
dirMenu = 1
virtualPath =
forbidCacheSuffix =
allow_cross_domains = 1
allow_ip_range = ::1,127.0.0.1,172.1.0.0-172.31.255.255,192.168.0.0-192.168.255.255,10.0.0.0-10.255.255.255
[multicast]
addrMax = 239.255.255.255
addrMin = 239.0.0.0
udpTTL = 64
[record]
appName = record
fileBufSize = 65536
sampleMS = 500
fastStart = 0
fileRepeat = 0
enableFmp4 = 0
[rtmp]
port = {{ .Values.zlm.ports.rtmp }}
sslport = 0
handshakeSecond = 15
keepAliveSecond = 15
directProxy = 1
enhanced = 0
[rtp]
audioMtuSize = 600
videoMtuSize = 1400
rtpMaxSize = 10
lowLatency = 0
h264_stap_a = 1
[rtp_proxy]
port = {{ .Values.zlm.ports.rtpProxy }}
port_range = {{ .Values.zlm.ports.rtpMin }}-{{ .Values.zlm.ports.rtpMax }}
dumpDir =
timeoutSec = 5
h264_pt = 98
h265_pt = 99
ps_pt = 96
opus_pt = 100
gop_cache = 1
rtp_g711_dur_ms = 100
udp_recv_socket_buffer = 4194304
[rtc]
bfilter=0
datachannel_echo=0
maxRtpCacheMS=5000
maxRtpCacheSize=2048
externIP = $(NODE_IP)
port = {{ .Values.zlm.ports.webrtc }}
tcpPort = {{ .Values.zlm.ports.webrtc }}
timeoutSec = 30
rembBitRate = 0
preferredCodecA = PCMA,PCMU,opus,mpeg4-generic
preferredCodecV = H264,H265,AV1,VP9,VP8
start_bitrate = 0
max_bitrate = 0
min_bitrate = 0
maxNackMS = 4000
rtpCacheCheckInterval = 96
nackMaxSize = 2048
nackMaxMS = 3000
nackMaxCount = 15
nackIntervalRatio = 1.0
nackRtpSize = 8
[srt]
port = {{ .Values.zlm.ports.srt }}
timeoutSec = 5
latencyMul = 4
pktBufSize = 8192
passPhrase=
[rtsp]
port = {{ .Values.zlm.ports.rtsp }}
sslport = 0
authBasic = 0
directProxy = 1
handshakeSecond = 15
keepAliveSecond = 15
lowLatency = 1
rtpTransportType = -1
[shell]
maxReqSize = 1024
port = 0

View File

@@ -0,0 +1,83 @@
apiVersion: v1
kind: ConfigMap
metadata:
namespace: {{ .Release.Namespace }}
name: {{ .Release.Name }}-zlm-oss-config
labels:
app: media-suite
chart: {{ .Chart.Name }}-{{ .Chart.Version }}
release: {{ .Release.Name }}
data:
config.yaml: |
app:
env: default
listen:
host: 0.0.0.0
port: {{ .Values.zlmOss.port }}
workers: 4
thread_pool: 8
log:
level: INFO
onfile_logger_interval: 10
backup_on_fails: true
skip_on_initializing_seconds: 4
skip_hubs: "Hangar, ai-5g-a"
file_dir:
shared: "/cmii/share/hls"
backup: "/cmii/backup"
debug:
save_all: false
save_to: "UASMS"
max_duration: 120
minio:
endpoint: "{{ .Values.external.minio.endpoint }}"
access_key: "{{ .Values.external.minio.accessKey }}"
secret_key: "{{ .Values.external.minio.secretKey }}"
mysql:
host: {{ .Values.external.database.host }}
port: {{ .Values.external.database.port }}
username: {{ .Values.external.database.username }}
password: {{ .Values.external.database.password }}
redis:
host: {{ .Values.external.redis.host }}
port: {{ .Values.external.redis.port }}
database: {{ .Values.redis.zlmOssDb }}
password: {{ .Values.external.redis.password }}
rabbitmq:
host: {{ .Values.external.rabbitmq.host }}
port: {{ .Values.external.rabbitmq.port }}
username: {{ .Values.external.rabbitmq.username }}
password: {{ .Values.external.rabbitmq.password }}
platforms:
live_op:
db_schema: "{{ .Values.databases.liveOp }}"
old_cmlc:
cloud_live: "{{ .Values.external.cloudLive }}"
quota: false
oss_bucket: "ilm-detect"
meta:
src_id: "1323096648758464518"
user_id: 0
company_id: 0
uasms:
scope_prefix: "UASMS"
oss_bucket: "ilm-detect"
meta:
src_id: "1323096648758464523"
platform: "REGULATOR"
user_id: 0
lite:
scope_prefix: "LITE"
oss_bucket: "ilm-detect"
routing_key: "sky.live.video"
meta:
src_id: "1111111112222222222"
platform: "LITE"
user_id: 0