blob: f95dd1e188fe38f06dd21a71ab34cffa81ff4e22 [file] [log] [blame]
{{/*
# Copyright 2019-present Open Networking Foundation
# SPDX-License-Identifier: LicenseRef-ONF-Member-Only-1.0
*/}}
---
apiVersion: v1
kind: Service
metadata:
name: cdn-local
labels:
{{ tuple "cdn-local" . | include "cdn-local.metadata_labels" | indent 4 }}
spec:
selector:
{{ tuple "cdn-local" . | include "cdn-local.metadata_labels" | indent 4 }}
ports:
- name: http
port: {{ .Values.config.nginx.ports.http }}
protocol: TCP
- name: rtmp
port: {{ .Values.config.nginx.ports.rtmp }}
protocol: TCP
{{- if .Values.config.nginx.ports.nodePorts.enabled }}
---
apiVersion: v1
kind: Service
metadata:
name: cdn-local-external
labels:
{{ tuple "cdn-local" . | include "cdn-local.metadata_labels" | indent 4 }}
spec:
selector:
{{ tuple "cdn-local" . | include "cdn-local.metadata_labels" | indent 4 }}
type: NodePort
ports:
- name: http
port: {{ .Values.config.nginx.ports.http }}
protocol: TCP
nodePort: {{ .Values.config.nginx.ports.nodePorts.http }}
- name: rtmp
port: {{ .Values.config.nginx.ports.rtmp }}
protocol: TCP
nodePort: {{ .Values.config.nginx.ports.nodePorts.rtmp }}
{{- end }}