[Agent][Deploy] - srs part

This commit is contained in:
zeaslity
2024-06-28 10:22:21 +08:00
parent 4c6bb8750a
commit 657b771475
49 changed files with 36146 additions and 34264 deletions

View File

@@ -14,7 +14,7 @@ metadata:
helm.sh/chart: cmlc-live-srs-rtc-2.0.0
data:
srs.rtc.conf: |-
listen 30935;
listen {{ .RtmpPort }};
max_connections 4096;
srs_log_tank console;
srs_log_level info;
@@ -43,7 +43,7 @@ data:
}
rtc_server {
enabled on;
listen 30090;
listen {{ .WebRTCPort }};
candidate $CANDIDATE;
}
vhost __defaultVhost__ {
@@ -85,7 +85,11 @@ data:
hls_m3u8_file [app]/[stream].m3u8;
hls_ts_file [app]/[stream]/[2006][01][02]/[timestamp]-[duration].ts;
hls_cleanup on;
{{- if .WebPort }}
hls_entry_prefix http://{{ .WebIP }}:{{ .WebPort }};
{{- else }}
hls_entry_prefix http://{{ .WebIP }};
{{- end }}
}
}
---
@@ -103,27 +107,27 @@ spec:
protocol: TCP
port: 30935
targetPort: 30935
nodePort: 30935
nodePort: {{ .RtmpPort }}
- name: rtc
protocol: UDP
port: 30090
targetPort: 30090
nodePort: 30090
nodePort: {{ .WebRTCPort }}
- name: rtc-tcp
protocol: TCP
port: 30090
targetPort: 30090
nodePort: 30090
nodePort: {{ .WebRTCPort }}
- name: srt
protocol: UDP
port: 30556
targetPort: 30556
nodePort: 30556
nodePort: {{ .SrtPort }}
- name: api
protocol: TCP
port: 1985
targetPort: 1985
nodePort: 30557
nodePort: {{ .WebApiPort }}
selector:
srs-role: rtc
type: NodePort
@@ -194,7 +198,6 @@ spec:
srs-role: rtc
template:
metadata:
creationTimestamp: null
labels:
srs-role: rtc
spec:
@@ -211,7 +214,11 @@ spec:
sizeLimit: 8Gi
containers:
- name: srs-rtc
{{- if .HarborPort }}
image: {{ .HarborIP }}:{{ .HarborPort }}/cmii/srs:v5.0.195
{{- else }}
image: {{ .HarborIP }}srs:v5.0.195
{{- end }}
ports:
- name: srs-rtmp
containerPort: 30935
@@ -236,8 +243,8 @@ spec:
value: {{ .WebIP }}
resources:
limits:
cpu: 1200m
memory: 6Gi
cpu: 2000m
memory: 4Gi
requests:
cpu: 100m
memory: 256Mi
@@ -255,7 +262,11 @@ spec:
terminationMessagePolicy: File
imagePullPolicy: Always
- name: oss-adaptor
{{- if .HarborPort }}
image: {{ .HarborIP }}:{{ .HarborPort }}/cmii/cmii-srs-oss-adaptor:2023-SA
{{- else }}
image: {{ .HarborIP }}cmii-srs-oss-adaptor:2023-SA
{{- end }}
env:
- name: OSS_ENDPOINT
value: 'http://{{ .MinioInnerIP }}:9000'
@@ -272,7 +283,7 @@ spec:
- name: MYSQL_USERNAME
value: k8s_admin
- name: MYSQL_PASSWORD
value: fP#UaH6qQ3)8
value: {{ .MySQLK8sAdminPassword }}
- name: MYSQL_DATABASE
value: cmii_live_srs_op
- name: MYSQL_TABLE
@@ -283,7 +294,7 @@ spec:
value: 'yes'
resources:
limits:
cpu: 1200m
cpu: 2000m
memory: 4Gi
requests:
cpu: 100m
@@ -332,7 +343,6 @@ spec:
live-role: op-v2
template:
metadata:
creationTimestamp: null
labels:
live-role: op-v2
spec:
@@ -346,7 +356,11 @@ spec:
defaultMode: 420
containers:
- name: helm-live-op-v2
{{- if .HarborPort }}
image: {{ .HarborIP }}:{{ .HarborPort }}/cmii/cmii-live-operator:5.2.0
{{- else }}
image: {{ .HarborIP }}cmii-live-operator:5.2.0
{{- end }}
ports:
- name: operator
containerPort: 8080
@@ -364,7 +378,7 @@ spec:
subPath: bootstrap.yaml
livenessProbe:
httpGet:
path: /cmii/ping
path: /cmii/health
port: 8080
scheme: HTTP
initialDelaySeconds: 60
@@ -374,7 +388,7 @@ spec:
failureThreshold: 3
readinessProbe:
httpGet:
path: /cmii/ping
path: /cmii/health
port: 8080
scheme: HTTP
initialDelaySeconds: 60
@@ -485,14 +499,13 @@ data:
engine:
type: srs
endpoint: 'http://helm-live-srs-svc:1985'
proto:
rtmp: 'rtmp://{{ .WebIP }}:30935'
rtmp: 'rtmp://{{ .WebIP }}:{{ .RtmpPort }}'
rtsp: 'rtsp://{{ .WebIP }}:30554'
srt: 'srt://{{ .WebIP }}:30556'
srt: 'srt://{{ .WebIP }}:{{ .SrtPort }}'
flv: 'http://{{ .WebIP }}:30500'
hls: 'http://{{ .WebIP }}:30500'
rtc: 'webrtc://{{ .WebIP }}:30557'
rtc: 'webrtc://{{ .WebIP }}:{{ .WebRTCPort }}'
replay: 'https://{{ .WebIP }}:30333'
minio:
endpoint: http://{{ .MinioInnerIP }}:9000