blob: 08969e9db3cf683f68a30fbf30e777423cfefb75 [file] [log] [blame]
Woojoong Kim9bcff462019-09-19 12:59:01 -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:
Hyunsun Moon7f23b2d2020-02-02 14:23:28 -080021 name: cdn-local
Woojoong Kim9bcff462019-09-19 12:59:01 -070022 labels:
Hyunsun Moon7f23b2d2020-02-02 14:23:28 -080023{{ tuple "cdn-local" . | include "cdn-local.metadata_labels" | indent 4 }}
Woojoong Kim9bcff462019-09-19 12:59:01 -070024spec:
25 selector:
Hyunsun Moon7f23b2d2020-02-02 14:23:28 -080026{{ tuple "cdn-local" . | include "cdn-local.metadata_labels" | indent 4 }}
Woojoong Kim9bcff462019-09-19 12:59:01 -070027 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
Woojoong Kim6622ff32020-02-12 18:39:40 -080035{{- if .Values.config.nginx.ports.nodePorts.enabled }}
Woojoong Kim9bcff462019-09-19 12:59:01 -070036---
37apiVersion: v1
38kind: Service
39metadata:
Hyunsun Moon7f23b2d2020-02-02 14:23:28 -080040 name: cdn-local-external
Woojoong Kim9bcff462019-09-19 12:59:01 -070041 labels:
Hyunsun Moon7f23b2d2020-02-02 14:23:28 -080042{{ tuple "cdn-local" . | include "cdn-local.metadata_labels" | indent 4 }}
Woojoong Kim9bcff462019-09-19 12:59:01 -070043spec:
44 selector:
Hyunsun Moon7f23b2d2020-02-02 14:23:28 -080045{{ tuple "cdn-local" . | include "cdn-local.metadata_labels" | indent 4 }}
Woojoong Kim9bcff462019-09-19 12:59:01 -070046 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
Hyunsun Moon7f23b2d2020-02-02 14:23:28 -080055 nodePort: {{ .Values.config.nginx.ports.nodePorts.rtmp }}
Woojoong Kim6622ff32020-02-12 18:39:40 -080056{{- end }}