blob: a8002d0fd189c76c8998607af9bf2c50e5ae11b5 [file] [log] [blame]
Jeremy Ronquillo11851d32020-06-08 15:13:08 -07001{{/*
Jeremy Ronquilloec2d3e42020-06-05 11:33:39 -07002# Copyright 2019-present Open Networking Foundation
Jeremy Ronquillo11851d32020-06-08 15:13:08 -07003
Jeremy Ronquilloec2d3e42020-06-05 11:33:39 -07004# SPDX-License-Identifier: Apache-2.0
5# SPDX-License-Identifier: LicenseRef-ONF-Member-Only
Jeremy Ronquillo11851d32020-06-08 15:13:08 -07006*/}}
7
8---
9apiVersion: v1
10kind: ConfigMap
11metadata:
12 name: nginx-net-config
13 labels:
14{{ tuple "nginx" . | include "cdn-local.metadata_labels" | indent 4 }}
15data:
16 run-nginx.sh: |
17{{ tuple "bin/_run-nginx.sh.tpl" . | include "cdn-local.template" | indent 4 }}
18
19---
20apiVersion: v1
21kind: ConfigMap
22metadata:
23 name: nginx-rtmp-config
24 labels:
25{{ tuple "nginx" . | include "cdn-local.metadata_labels" | indent 4 }}
26data:
27 nginx.conf: |+
28 worker_processes {{ .Values.config.nginx.events.workerProcesses }};
29
30 events {
31 worker_connections {{ .Values.config.nginx.events.workerConnections }};
32 }
33
34 http {
35 include mime.types;
36
37 default_type {{ .Values.config.nginx.http.defaultType }};
38
39 sendfile {{ .Values.config.nginx.http.sendfile }};
40
41 keepalive_timeout {{ .Values.config.nginx.http.keepaliveTimeout }};
42
43 server {
44 listen {{ .Values.config.nginx.ports.http }};
45
46 server_name {{ .Values.config.nginx.http.server.serverName }};
47
48 location / {
49 root {{ .Values.config.nginx.http.server.location.root }};
50
51 index {{ .Values.config.nginx.http.server.location.index }};
52 }
53
54 error_page {{ .Values.config.nginx.http.server.error.code }} {{ .Values.config.nginx.http.server.error.page }};
55
56 location = {{ .Values.config.nginx.http.server.error.page }} {
57 root {{ .Values.config.nginx.http.server.error.root }};
58 }
59 }
60 }
61
62 rtmp {
63 server{
64 listen {{ .Values.config.nginx.ports.rtmp }};
65
66 chunk_size {{ .Values.config.nginx.rtmp.chunkSize }};
67
68 {{ range .Values.config.cdnRemotes }}
69 {{- $cdnRemote := . -}}
70 # name: {{ .name }}
71 application {{ $.Values.config.nginx.rtmp.appRemote.name }}/{{ $cdnRemote.name }} {
72 live {{ $.Values.config.nginx.rtmp.appRemote.live }};
73
74 {{- range .streams }}
75 pull rtmp://{{ $cdnRemote.ip }}:{{ $cdnRemote.port }}/LiveApp/{{ .value }} name={{ .value }};
76 {{- end }}
77
78 }
79 {{ end }}
80
81 application {{ .Values.config.nginx.rtmp.appLocal.name }} {
82 play {{ .Values.config.nginx.rtmp.appLocal.movieLocation }};
83 }
84 }
85 }