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