Woojoong Kim | 2ccf324 | 2019-06-06 14:12:44 -0700 | [diff] [blame^] | 1 | --- |
| 2 | # Copyright 2019-present Open Networking Foundation |
| 3 | # |
| 4 | # Licensed under the Apache License, Version 2.0 (the "License"); |
| 5 | # you may not use this file except in compliance with the License. |
| 6 | # You may obtain a copy of the License at |
| 7 | # |
| 8 | # http://www.apache.org/licenses/LICENSE-2.0 |
| 9 | # |
| 10 | # Unless required by applicable law or agreed to in writing, software |
| 11 | # distributed under the License is distributed on an "AS IS" BASIS, |
| 12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 13 | # See the License for the specific language governing permissions and |
| 14 | # limitations under the License. |
| 15 | |
| 16 | --- |
| 17 | apiVersion: v1 |
| 18 | kind: ConfigMap |
| 19 | metadata: |
| 20 | name: nginx-rtmp-config |
| 21 | data: |
| 22 | nginx_rtmp_config.sh: |+ |
| 23 | #!/bin/bash |
| 24 | ip route add {{ .Values.ue_ip_subnet1 }} via {{ .Values.spgwu_sgiip }} dev sgi-net; |
| 25 | ip route add {{ .Values.ue_ip_subnet2 }} via {{ .Values.spgwu_sgiip }} dev sgi-net; |
| 26 | ip link set sgi-net mtu 1200; |
| 27 | cp /conf/nginx.conf /etc/nginx/ |
| 28 | nginx -g "daemon off;" |
| 29 | --- |
| 30 | apiVersion: v1 |
| 31 | kind: ConfigMap |
| 32 | metadata: |
| 33 | name: nginx-rtmp-conf |
| 34 | data: |
| 35 | nginx.conf: |+ |
| 36 | worker_processes 1; |
| 37 | |
| 38 | events { |
| 39 | worker_connections 1024; |
| 40 | } |
| 41 | |
| 42 | |
| 43 | http { |
| 44 | include mime.types; |
| 45 | default_type application/octet-stream; |
| 46 | |
| 47 | sendfile on; |
| 48 | keepalive_timeout 65; |
| 49 | |
| 50 | server { |
| 51 | listen 8085; |
| 52 | server_name localhost; |
| 53 | |
| 54 | location / { |
| 55 | root html; |
| 56 | index index.html index.htm; |
| 57 | } |
| 58 | |
| 59 | error_page 500 502 503 504 /50x.html; |
| 60 | location = /50x.html { |
| 61 | root html; |
| 62 | } |
| 63 | } |
| 64 | } |
| 65 | rtmp { |
| 66 | server { |
| 67 | listen 1935; |
| 68 | chunk_size 4000; |
| 69 | application r { |
| 70 | live on; |
| 71 | pull rtmp://{{ .Values.remote_ip }}:30935/LiveApp/{{ .Values.stream_name }}; |
| 72 | } |
| 73 | application l { |
| 74 | play /opt/cdn/movies; |
| 75 | } |
| 76 | } |
| 77 | } |