157 lines
5.4 KiB
YAML
157 lines
5.4 KiB
YAML
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 }}
|