blob: 08969e9db3cf683f68a30fbf30e777423cfefb75 [file] [log] [blame]
Jeremy Ronquillo11851d32020-06-08 15:13:08 -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: Service
20metadata:
21 name: cdn-local
22 labels:
23{{ tuple "cdn-local" . | include "cdn-local.metadata_labels" | indent 4 }}
24spec:
25 selector:
26{{ tuple "cdn-local" . | include "cdn-local.metadata_labels" | indent 4 }}
27 ports:
28 - name: http
29 port: {{ .Values.config.nginx.ports.http }}
30 protocol: TCP
31 - name: rtmp
32 port: {{ .Values.config.nginx.ports.rtmp }}
33 protocol: TCP
34
35{{- if .Values.config.nginx.ports.nodePorts.enabled }}
36---
37apiVersion: v1
38kind: Service
39metadata:
40 name: cdn-local-external
41 labels:
42{{ tuple "cdn-local" . | include "cdn-local.metadata_labels" | indent 4 }}
43spec:
44 selector:
45{{ tuple "cdn-local" . | include "cdn-local.metadata_labels" | indent 4 }}
46 type: NodePort
47 ports:
48 - name: http
49 port: {{ .Values.config.nginx.ports.http }}
50 protocol: TCP
51 nodePort: {{ .Values.config.nginx.ports.nodePorts.http }}
52 - name: rtmp
53 port: {{ .Values.config.nginx.ports.rtmp }}
54 protocol: TCP
55 nodePort: {{ .Values.config.nginx.ports.nodePorts.rtmp }}
56{{- end }}