blob: c97689a2162e973744cec5e0b1fd2b7536ca2905 [file] [log] [blame]
{{/*
# Copyright 2019-present Open Networking Foundation
# SPDX-License-Identifier: LicenseRef-ONF-Member-Only-1.0
*/}}
{{- if .Values.config.spgwc.deploy }}
---
apiVersion: v1
kind: Service
metadata:
name: spgwc
labels:
{{ tuple "spgwc" . | include "omec-control-plane.metadata_labels" | indent 4 }}
spec:
type: ClusterIP
selector:
{{ tuple "spgwc" . | include "omec-control-plane.metadata_labels" | indent 4 }}
ports:
- name: s11
port: {{ .Values.config.spgwc.s11.port }}
protocol: UDP
- name: pfcp
port: {{ .Values.config.spgwc.n4.port }}
protocol: UDP
- name: prometheus-exporter
port: {{ .Values.config.spgwc.prometheus.port }}
protocol: TCP
- name: rest
port: {{ .Values.config.spgwc.rest.port }}
protocol: TCP
---
apiVersion: v1
kind: Service
metadata:
name: spgwc-headless
labels:
{{ tuple "spgwc" . | include "omec-control-plane.metadata_labels" | indent 4 }}
spec:
clusterIP: None
selector:
{{ tuple "spgwc" . | include "omec-control-plane.metadata_labels" | indent 4 }}
{{- if or .Values.config.spgwc.s11.nodePort.enabled .Values.config.spgwc.n4.nodePort.enabled .Values.config.spgwc.prometheus.nodePort.enabled .Values.config.spgwc.rest.nodePort.enabled }}
---
apiVersion: v1
kind: Service
metadata:
name: spgwc-external
labels:
{{ tuple "spgwc" . | include "omec-control-plane.metadata_labels" | indent 4 }}
spec:
type: NodePort
selector:
{{ tuple "spgwc" . | include "omec-control-plane.metadata_labels" | indent 4 }}
ports:
{{- if .Values.config.spgwc.s11.nodePort.enabled }}
- name: s11
port: {{ .Values.config.spgwc.s11.port }}
protocol: UDP
nodePort: {{ .Values.config.spgwc.s11.nodePort.port }}
{{- end }}
{{- if .Values.config.spgwc.n4.nodePort.enabled }}
- name: pfcp
port: {{ .Values.config.spgwc.n4.port }}
protocol: UDP
nodePort: {{ .Values.config.spgwc.n4.nodePort.port }}
{{- end }}
{{- if .Values.config.spgwc.prometheus.nodePort.enabled }}
- name: prometheus-exporter
port: {{ .Values.config.spgwc.prometheus.port }}
protocol: TCP
nodePort: {{ .Values.config.spgwc.prometheus.nodePort.port }}
{{- end }}
{{- if .Values.config.spgwc.rest.nodePort.enabled }}
- name: rest
port: {{ .Values.config.spgwc.rest.port }}
protocol: TCP
nodePort: {{ .Values.config.spgwc.rest.nodePort.port }}
{{- end }}
{{- end }}
{{- end }}