blob: 75db4d68bfdfa7065ad83f6de7b46db6d5d4f4cd [file] [log] [blame]
Woojoong Kim9bcff462019-09-19 12:59:01 -07001{{/*
2Copyright 2019-present Open Networking Foundation
3
4Licensed under the Apache License, Version 2.0 (the "License");
5you may not use this file except in compliance with the License.
6You may obtain a copy of the License at
7
8http://www.apache.org/licenses/LICENSE-2.0
9
10Unless required by applicable law or agreed to in writing, software
11distributed under the License is distributed on an "AS IS" BASIS,
12WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13See the License for the specific language governing permissions and
14limitations under the License.
15*/}}
16
17---
18apiVersion: v1
19kind: ConfigMap
20metadata:
21 name: nginx-net-config
22 labels:
23{{ tuple "nginx" . | include "cdn-local.metadata_labels" | indent 4 }}
24data:
Woojoong Kim9bcff462019-09-19 12:59:01 -070025 run-nginx.sh: |
26{{ tuple "bin/_run-nginx.sh.tpl" . | include "cdn-local.template" | indent 4 }}
27
28---
29apiVersion: v1
30kind: ConfigMap
31metadata:
32 name: nginx-rtmp-config
33 labels:
34{{ tuple "nginx" . | include "cdn-local.metadata_labels" | indent 4 }}
35data:
36 nginx.conf: |+
37 worker_processes {{ .Values.config.nginx.events.workerProcesses }};
38
39 events {
40 worker_connections {{ .Values.config.nginx.events.workerConnections }};
41 }
42
43 http {
44 include mime.types;
45
46 default_type {{ .Values.config.nginx.http.defaultType }};
47
48 sendfile {{ .Values.config.nginx.http.sendfile }};
49
50 keepalive_timeout {{ .Values.config.nginx.http.keepaliveTimeout }};
51
52 server {
53 listen {{ .Values.config.nginx.ports.http }};
54
55 server_name {{ .Values.config.nginx.http.server.serverName }};
56
57 location / {
58 root {{ .Values.config.nginx.http.server.location.root }};
59
60 index {{ .Values.config.nginx.http.server.location.index }};
61 }
62
63 error_page {{ .Values.config.nginx.http.server.error.code }} {{ .Values.config.nginx.http.server.error.page }};
64
65 location = {{ .Values.config.nginx.http.server.error.page }} {
66 root {{ .Values.config.nginx.http.server.error.root }};
67 }
68 }
69 }
70
71 rtmp {
72 server{
73 listen {{ .Values.config.nginx.ports.rtmp }};
74
75 chunk_size {{ .Values.config.nginx.rtmp.chunkSize }};
76
77 {{ range .Values.config.cdnRemotes }}
78 {{- $cdnRemote := . -}}
79 # name: {{ .name }}
80 application {{ $.Values.config.nginx.rtmp.appRemote.name }}/{{ $cdnRemote.name }} {
81 live {{ $.Values.config.nginx.rtmp.appRemote.live }};
82
83 {{- range .streams }}
84 pull rtmp://{{ $cdnRemote.ip }}:{{ $cdnRemote.port }}/LiveApp/{{ .value }} name={{ .value }};
85 {{- end }}
86
87 }
88 {{ end }}
89
90 application {{ .Values.config.nginx.rtmp.appLocal.name }} {
91 play {{ .Values.config.nginx.rtmp.appLocal.movieLocation }};
92 }
93 }
Hyunsun Moon7f23b2d2020-02-02 14:23:28 -080094 }