331 lines
8.0 KiB
Bash
331 lines
8.0 KiB
Bash
|
|
--boundary_.oOo._zgzMgQh/rOnRA9A4gE+lHiV8P1Y9iLla
|
|
Content-Length: 11851
|
|
Content-Type: application/octet-stream
|
|
If-Match: "3fac96b57c20286bab1a25b12072e39f"
|
|
X-File-MD5: f4379314e889122626fd2ce8b321932f
|
|
X-File-Mtime: 1712558780
|
|
X-File-Path: /MasterLoad/Work/UAV Cloud/22.希腊项目-阿里云-德国/999-部署模板/k8s-srs-template.yaml
|
|
|
|
---
|
|
kind: ConfigMap
|
|
apiVersion: v1
|
|
metadata:
|
|
name: helm-live-srs-cm
|
|
namespace: SUPREME
|
|
labels:
|
|
app.kubernetes.io/managed-by: Helm
|
|
cmii.app: live-srs
|
|
cmii.type: midware
|
|
helm.sh/chart: cmlc-live-srs-rtc-2.0.0
|
|
data:
|
|
srs.rtc.conf: |-
|
|
listen 30935;
|
|
max_connections 4096;
|
|
srs_log_tank console;
|
|
srs_log_level info;
|
|
srs_log_file /home/srs.log;
|
|
daemon off;
|
|
http_api {
|
|
enabled on;
|
|
listen 1985;
|
|
crossdomain on;
|
|
}
|
|
stats {
|
|
network 0;
|
|
}
|
|
http_server {
|
|
enabled on;
|
|
listen 8080;
|
|
dir /home/hls;
|
|
}
|
|
srt_server {
|
|
enabled on;
|
|
listen 30556;
|
|
maxbw 1000000000;
|
|
connect_timeout 4000;
|
|
peerlatency 600;
|
|
recvlatency 600;
|
|
}
|
|
rtc_server {
|
|
enabled on;
|
|
listen 30090;
|
|
candidate $CANDIDATE;
|
|
}
|
|
vhost __defaultVhost__ {
|
|
http_hooks {
|
|
enabled on;
|
|
on_publish http://helm-live-op-svc-v2:8080/hooks/on_push;
|
|
}
|
|
http_remux {
|
|
enabled on;
|
|
}
|
|
rtc {
|
|
enabled on;
|
|
rtmp_to_rtc on;
|
|
rtc_to_rtmp on;
|
|
keep_bframe off;
|
|
}
|
|
tcp_nodelay on;
|
|
min_latency on;
|
|
play {
|
|
gop_cache off;
|
|
mw_latency 100;
|
|
mw_msgs 10;
|
|
}
|
|
publish {
|
|
firstpkt_timeout 8000;
|
|
normal_timeout 4000;
|
|
mr on;
|
|
}
|
|
dvr {
|
|
enabled off;
|
|
dvr_path /home/dvr/[app]/[stream]/[2006][01]/[timestamp].mp4;
|
|
dvr_plan session;
|
|
}
|
|
hls {
|
|
enabled on;
|
|
hls_path /home/hls;
|
|
hls_fragment 10;
|
|
hls_window 60;
|
|
hls_m3u8_file [app]/[stream].m3u8;
|
|
hls_ts_file [app]/[stream]/[2006][01][02]/[timestamp]-[duration].ts;
|
|
hls_cleanup on;
|
|
hls_entry_prefix http://A1C1IP:A1C1JS;
|
|
}
|
|
}
|
|
---
|
|
kind: Service
|
|
apiVersion: v1
|
|
metadata:
|
|
name: helm-live-srs-svc-exporter
|
|
namespace: SUPREME
|
|
labels:
|
|
app.kubernetes.io/managed-by: Helm
|
|
spec:
|
|
ports:
|
|
- name: rtmp
|
|
protocol: TCP
|
|
port: 30935
|
|
targetPort: 30935
|
|
nodePort: 30935
|
|
- name: rtc
|
|
protocol: UDP
|
|
port: 30090
|
|
targetPort: 30090
|
|
nodePort: 30090
|
|
- name: srt
|
|
protocol: UDP
|
|
port: 30556
|
|
targetPort: 30556
|
|
nodePort: 30556
|
|
- name: api
|
|
protocol: TCP
|
|
port: 1985
|
|
targetPort: 1985
|
|
nodePort: 30557
|
|
selector:
|
|
srs-role: rtc
|
|
type: NodePort
|
|
sessionAffinity: None
|
|
externalTrafficPolicy: Cluster
|
|
|
|
---
|
|
kind: Service
|
|
apiVersion: v1
|
|
metadata:
|
|
name: helm-live-srs-svc
|
|
namespace: SUPREME
|
|
labels:
|
|
app.kubernetes.io/managed-by: Helm
|
|
spec:
|
|
ports:
|
|
- name: http
|
|
protocol: TCP
|
|
port: 8080
|
|
targetPort: 8080
|
|
- name: api
|
|
protocol: TCP
|
|
port: 1985
|
|
targetPort: 1985
|
|
selector:
|
|
srs-role: rtc
|
|
type: ClusterIP
|
|
sessionAffinity: None
|
|
|
|
---
|
|
kind: Service
|
|
apiVersion: v1
|
|
metadata:
|
|
name: helm-live-srsrtc-svc
|
|
namespace: SUPREME
|
|
labels:
|
|
app.kubernetes.io/managed-by: Helm
|
|
spec:
|
|
ports:
|
|
- name: rtmp
|
|
protocol: TCP
|
|
port: 30935
|
|
targetPort: 30935
|
|
selector:
|
|
srs-role: rtc
|
|
type: ClusterIP
|
|
sessionAffinity: None
|
|
|
|
---
|
|
kind: StatefulSet
|
|
apiVersion: apps/v1
|
|
metadata:
|
|
name: helm-live-srs-rtc
|
|
namespace: SUPREME
|
|
labels:
|
|
app.kubernetes.io/managed-by: Helm
|
|
cmii.app: live-srs
|
|
cmii.type: midware
|
|
helm.sh/chart: cmlc-live-srs-rtc-2.0.0
|
|
srs-role: rtc
|
|
spec:
|
|
replicas: 1
|
|
selector:
|
|
matchLabels:
|
|
srs-role: rtc
|
|
template:
|
|
metadata:
|
|
creationTimestamp: null
|
|
labels:
|
|
srs-role: rtc
|
|
spec:
|
|
volumes:
|
|
- name: srs-conf-file
|
|
configMap:
|
|
name: helm-live-srs-cm
|
|
items:
|
|
- key: srs.rtc.conf
|
|
path: docker.conf
|
|
defaultMode: 420
|
|
- name: srs-vol
|
|
emptyDir:
|
|
sizeLimit: 8Gi
|
|
containers:
|
|
- name: srs-rtc
|
|
image: 'A1C2IP:8033/cmii/srs:v5.0.195'
|
|
ports:
|
|
- name: srs-rtmp
|
|
containerPort: 30935
|
|
protocol: TCP
|
|
- name: srs-api
|
|
containerPort: 1985
|
|
protocol: TCP
|
|
- name: srs-flv
|
|
containerPort: 8080
|
|
protocol: TCP
|
|
- name: srs-webrtc
|
|
containerPort: 30090
|
|
protocol: UDP
|
|
- name: srs-srt
|
|
containerPort: 30556
|
|
protocol: UDP
|
|
env:
|
|
- name: CANDIDATE
|
|
value: A1C1IP
|
|
resources:
|
|
limits:
|
|
cpu: 1200m
|
|
memory: 6Gi
|
|
requests:
|
|
cpu: 100m
|
|
memory: 256Mi
|
|
volumeMounts:
|
|
- name: srs-conf-file
|
|
mountPath: /usr/local/srs/conf/docker.conf
|
|
subPath: docker.conf
|
|
- name: srs-vol
|
|
mountPath: /home/dvr
|
|
subPath: SUPREME/helm-live/dvr
|
|
- name: srs-vol
|
|
mountPath: /home/hls
|
|
subPath: SUPREME/helm-live/hls
|
|
terminationMessagePath: /dev/termination-log
|
|
terminationMessagePolicy: File
|
|
imagePullPolicy: Always
|
|
- name: oss-adaptor
|
|
image: 'A1C2IP:8033/cmii/cmii-srs-oss-adaptor:2023-SA'
|
|
env:
|
|
- name: OSS_ENDPOINT
|
|
value: 'http://M2D2IP:9000'
|
|
- name: OSS_AK
|
|
value: cmii
|
|
- name: OSS_SK
|
|
value: 'B#923fC7mk'
|
|
- name: OSS_BUCKET
|
|
value: live-cluster-hls
|
|
- name: SRS_OP
|
|
value: 'http://helm-live-op-svc-v2:8080'
|
|
- name: MYSQL_ENDPOINT
|
|
value: 'helm-mysql:3306'
|
|
- name: MYSQL_USERNAME
|
|
value: k8s_admin
|
|
- name: MYSQL_PASSWORD
|
|
value: fP#UaH6qQ3)8
|
|
- name: MYSQL_DATABASE
|
|
value: cmii_live_srs_op
|
|
- name: MYSQL_TABLE
|
|
value: live_segment
|
|
- name: LOG_LEVEL
|
|
value: info
|
|
- name: OSS_META
|
|
value: 'yes'
|
|
resources:
|
|
limits:
|
|
cpu: 1200m
|
|
memory: 4Gi
|
|
requests:
|
|
cpu: 100m
|
|
memory: 256Mi
|
|
volumeMounts:
|
|
- name: srs-vol
|
|
mountPath: /cmii/share/hls
|
|
subPath: SUPREME/helm-live/hls
|
|
terminationMessagePath: /dev/termination-log
|
|
terminationMessagePolicy: File
|
|
imagePullPolicy: Always
|
|
restartPolicy: Always
|
|
terminationGracePeriodSeconds: 30
|
|
dnsPolicy: ClusterFirst
|
|
securityContext: {}
|
|
imagePullSecrets:
|
|
- name: harborsecret
|
|
affinity: {}
|
|
schedulerName: default-scheduler
|
|
serviceName: helm-live-srsrtc-svc
|
|
podManagementPolicy: OrderedReady
|
|
updateStrategy:
|
|
type: RollingUpdate
|
|
rollingUpdate:
|
|
partition: 0
|
|
revisionHistoryLimit: 10
|
|
---
|
|
# live-srs部分
|
|
---
|
|
kind: Deployment
|
|
apiVersion: apps/v1
|
|
metadata:
|
|
name: helm-live-op-v2
|
|
namespace: SUPREME
|
|
labels:
|
|
app.kubernetes.io/managed-by: Helm
|
|
cmii.app: live-engine
|
|
cmii.type: midware
|
|
helm.sh/chart: cmlc-live-live-op-2.0.0
|
|
live-role: op-v2
|
|
spec:
|
|
replicas: 1
|
|
selector:
|
|
matchLabels:
|
|
live-role: op-v2
|
|
template:
|
|
metadata:
|
|
creationTimestamp: null
|
|
labels:
|
|
live-role: op-v2
|
|
spe |