--- kind: ConfigMap apiVersion: v1 metadata: name: helm-live-srs-cm namespace: uavcloud-demo labels: cmii.app: live-srs cmii.type: live octopus.control: wdd app.kubernetes.io/managed-by: octopus helm.sh/chart: cmlc-live-srs-rtc-2.0.0 data: srs.rtc.conf: |- listen 31935; 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://www.demo.uavcmlc.com; } } --- kind: Service apiVersion: v1 metadata: name: helm-live-srs-svc-exporter namespace: uavcloud-demo labels: octopus.control: wdd app.kubernetes.io/managed-by: octopus spec: ports: - name: rtmp protocol: TCP port: 31935 targetPort: 31935 nodePort: 31935 - name: rtc protocol: UDP port: 30090 targetPort: 30090 nodePort: 30090 - name: rtc-tcp protocol: TCP 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: 30080 selector: srs-role: rtc type: NodePort sessionAffinity: None externalTrafficPolicy: Cluster --- kind: Service apiVersion: v1 metadata: name: helm-live-srs-svc namespace: uavcloud-demo labels: octopus.control: wdd app.kubernetes.io/managed-by: octopus 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: uavcloud-demo labels: octopus.control: wdd app.kubernetes.io/managed-by: octopus spec: ports: - name: rtmp protocol: TCP port: 31935 targetPort: 31935 selector: srs-role: rtc type: ClusterIP sessionAffinity: None --- kind: StatefulSet apiVersion: apps/v1 metadata: name: helm-live-srs-rtc namespace: uavcloud-demo labels: octopus.control: wdd app.kubernetes.io/managed-by: octopus cmii.app: live-srs cmii.type: live helm.sh/chart: cmlc-live-srs-rtc-2.0.0 srs-role: rtc spec: replicas: 1 selector: matchLabels: srs-role: rtc template: metadata: 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: harbor.cdcyy.com.cn/cmii/srs:v5.0.195 ports: - name: srs-rtmp containerPort: 31935 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-webrtc-tcp containerPort: 30090 protocol: TCP - name: srs-srt containerPort: 30556 protocol: UDP env: - name: CANDIDATE value: www.demo.uavcmlc.com resources: limits: cpu: 2000m memory: 4Gi 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: uavcloud-demo/helm-live/dvr - name: srs-vol mountPath: /home/hls subPath: uavcloud-demo/helm-live/hls terminationMessagePath: /dev/termination-log terminationMessagePolicy: File imagePullPolicy: Always - name: oss-adaptor image: harbor.cdcyy.com.cn/cmii/cmii-srs-oss-adaptor:2023-SA-skip-CHL env: - name: OSS_ENDPOINT value: 'http://192.168.118.15: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: 2000m memory: 4Gi requests: cpu: 100m memory: 256Mi volumeMounts: - name: srs-vol mountPath: /cmii/share/hls subPath: uavcloud-demo/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: uavcloud-demo labels: octopus.control: wdd app.kubernetes.io/managed-by: octopus cmii.app: live-engine cmii.type: live 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: labels: live-role: op-v2 spec: volumes: - name: srs-conf-file configMap: name: helm-live-op-cm-v2 items: - key: live.op.conf path: bootstrap.yaml defaultMode: 420 containers: - name: helm-live-op-v2 image: harbor.cdcyy.com.cn/cmii/cmii-live-operator:5.2.0 ports: - name: operator containerPort: 8080 protocol: TCP resources: limits: cpu: 4800m memory: 4Gi requests: cpu: 100m memory: 256Mi volumeMounts: - name: srs-conf-file mountPath: /cmii/bootstrap.yaml subPath: bootstrap.yaml livenessProbe: httpGet: path: /cmii/health port: 8080 scheme: HTTP initialDelaySeconds: 60 timeoutSeconds: 5 periodSeconds: 20 successThreshold: 1 failureThreshold: 3 readinessProbe: httpGet: path: /cmii/health port: 8080 scheme: HTTP initialDelaySeconds: 60 timeoutSeconds: 5 periodSeconds: 20 successThreshold: 1 failureThreshold: 3 terminationMessagePath: /dev/termination-log terminationMessagePolicy: File imagePullPolicy: Always restartPolicy: Always terminationGracePeriodSeconds: 30 dnsPolicy: ClusterFirst securityContext: {} imagePullSecrets: - name: harborsecret affinity: {} schedulerName: default-scheduler strategy: type: RollingUpdate rollingUpdate: maxUnavailable: 25% maxSurge: 25% revisionHistoryLimit: 10 progressDeadlineSeconds: 600 --- kind: Service apiVersion: v1 metadata: name: helm-live-op-svc-v2 namespace: uavcloud-demo labels: octopus.control: wdd app.kubernetes.io/managed-by: octopus spec: ports: - protocol: TCP port: 8080 targetPort: 8080 nodePort: 30333 selector: live-role: op-v2 type: NodePort sessionAffinity: None --- kind: Service apiVersion: v1 metadata: name: helm-live-op-svc namespace: uavcloud-demo labels: octopus.control: wdd app.kubernetes.io/managed-by: octopus spec: ports: - protocol: TCP port: 8080 targetPort: 8080 selector: live-role: op type: ClusterIP sessionAffinity: None --- kind: ConfigMap apiVersion: v1 metadata: name: helm-live-op-cm-v2 namespace: uavcloud-demo labels: octopus.control: wdd app.kubernetes.io/managed-by: octopus cmii.app: live-engine cmii.type: live data: live.op.conf: |- server: port: 8080 spring: main: allow-bean-definition-overriding: true allow-circular-references: true application: name: cmii-live-operator platform: info: name: cmii-live-operator description: cmii-live-operator version: 6.2.0 scanPackage: com.cmii.live.op cloud: nacos: config: username: nacos password: KingKong@95461234 server-addr: helm-nacos:8848 extension-configs: - data-id: cmii-live-operator.yml group: 6.2.0 refresh: true shared-configs: - data-id: cmii-backend-system.yml group: 6.2.0 refresh: true discovery: enabled: false live: engine: type: srs endpoint: 'http://helm-live-srs-svc:1985' proto: rtmp: 'rtmp://www.demo.uavcmlc.com:31935' rtsp: 'rtsp://www.demo.uavcmlc.com:30554' srt: 'srt://www.demo.uavcmlc.com:30556' flv: 'http://www.demo.uavcmlc.com:30500' hls: 'http://www.demo.uavcmlc.com:30500' rtc: 'webrtc://www.demo.uavcmlc.com:30080' replay: 'https://www.demo.uavcmlc.com:30333' minio: endpoint: http://192.168.118.15:9000 access-key: cmii secret-key: B#923fC7mk bucket: live-cluster-hls