blob: f95dd1e188fe38f06dd21a71ab34cffa81ff4e22 [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: Service
10metadata:
11 name: cdn-local
12 labels:
13{{ tuple "cdn-local" . | include "cdn-local.metadata_labels" | indent 4 }}
14spec:
15 selector:
16{{ tuple "cdn-local" . | include "cdn-local.metadata_labels" | indent 4 }}
17 ports:
18 - name: http
19 port: {{ .Values.config.nginx.ports.http }}
20 protocol: TCP
21 - name: rtmp
22 port: {{ .Values.config.nginx.ports.rtmp }}
23 protocol: TCP
24
25{{- if .Values.config.nginx.ports.nodePorts.enabled }}
26---
27apiVersion: v1
28kind: Service
29metadata:
30 name: cdn-local-external
31 labels:
32{{ tuple "cdn-local" . | include "cdn-local.metadata_labels" | indent 4 }}
33spec:
34 selector:
35{{ tuple "cdn-local" . | include "cdn-local.metadata_labels" | indent 4 }}
36 type: NodePort
37 ports:
38 - name: http
39 port: {{ .Values.config.nginx.ports.http }}
40 protocol: TCP
41 nodePort: {{ .Values.config.nginx.ports.nodePorts.http }}
42 - name: rtmp
43 port: {{ .Values.config.nginx.ports.rtmp }}
44 protocol: TCP
45 nodePort: {{ .Values.config.nginx.ports.nodePorts.rtmp }}
Jeremy Ronquillo6046ce32020-06-18 11:06:29 -070046{{- end }}