blob: 5dd3ba46ff67945075ab0fc1dba4fa715cc3c8c9 [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: cp-comm
port: {{ .Values.config.spgwc.cpComm.port }}
{{- if .Values.config.spgwc.multiUpfs }}
protocol: TCP
{{- else }}
protocol: UDP
{{- end }}
- name: s11
port: {{ .Values.config.spgwc.s11.port }}
protocol: UDP
- name: prometheus-exporter
port: {{ .Values.config.spgwc.prometheus.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 }}
ports:
- name: cp-comm
port: {{ .Values.config.spgwc.cpComm.port }}
{{- if .Values.config.spgwc.multiUpfs }}
protocol: TCP
{{- else }}
protocol: UDP
{{- end }}
- name: s11
port: {{ .Values.config.spgwc.s11.port }}
protocol: UDP
{{- if not .Values.config.spgwc.multiUpfs }}
{{- if or .Values.config.spgwc.cpComm.nodePort.enabled .Values.config.spgwc.s11.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.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.cpComm.nodePort.enabled }}
- name: cp-comm
port: {{ .Values.config.spgwc.cpComm.port }}
protocol: TCP
{{- end }}
{{- if .Values.config.spgwc.s11.nodePort.enabled }}
- name: s11
port: {{ .Values.config.spgwc.s11.port }}
protocol: UDP
{{- end }}
{{- end }}
{{- end }}
{{- end }}