blob: a8002d0fd189c76c8998607af9bf2c50e5ae11b5 [file] [log] [blame]
{{/*
# Copyright 2019-present Open Networking Foundation
# SPDX-License-Identifier: Apache-2.0
# SPDX-License-Identifier: LicenseRef-ONF-Member-Only
*/}}
---
apiVersion: v1
kind: ConfigMap
metadata:
name: nginx-net-config
labels:
{{ tuple "nginx" . | include "cdn-local.metadata_labels" | indent 4 }}
data:
run-nginx.sh: |
{{ tuple "bin/_run-nginx.sh.tpl" . | include "cdn-local.template" | indent 4 }}
---
apiVersion: v1
kind: ConfigMap
metadata:
name: nginx-rtmp-config
labels:
{{ tuple "nginx" . | include "cdn-local.metadata_labels" | indent 4 }}
data:
nginx.conf: |+
worker_processes {{ .Values.config.nginx.events.workerProcesses }};
events {
worker_connections {{ .Values.config.nginx.events.workerConnections }};
}
http {
include mime.types;
default_type {{ .Values.config.nginx.http.defaultType }};
sendfile {{ .Values.config.nginx.http.sendfile }};
keepalive_timeout {{ .Values.config.nginx.http.keepaliveTimeout }};
server {
listen {{ .Values.config.nginx.ports.http }};
server_name {{ .Values.config.nginx.http.server.serverName }};
location / {
root {{ .Values.config.nginx.http.server.location.root }};
index {{ .Values.config.nginx.http.server.location.index }};
}
error_page {{ .Values.config.nginx.http.server.error.code }} {{ .Values.config.nginx.http.server.error.page }};
location = {{ .Values.config.nginx.http.server.error.page }} {
root {{ .Values.config.nginx.http.server.error.root }};
}
}
}
rtmp {
server{
listen {{ .Values.config.nginx.ports.rtmp }};
chunk_size {{ .Values.config.nginx.rtmp.chunkSize }};
{{ range .Values.config.cdnRemotes }}
{{- $cdnRemote := . -}}
# name: {{ .name }}
application {{ $.Values.config.nginx.rtmp.appRemote.name }}/{{ $cdnRemote.name }} {
live {{ $.Values.config.nginx.rtmp.appRemote.live }};
{{- range .streams }}
pull rtmp://{{ $cdnRemote.ip }}:{{ $cdnRemote.port }}/LiveApp/{{ .value }} name={{ .value }};
{{- end }}
}
{{ end }}
application {{ .Values.config.nginx.rtmp.appLocal.name }} {
play {{ .Values.config.nginx.rtmp.appLocal.movieLocation }};
}
}
}