blob: 512ea4928f47c6868bee4167313143abfc027d55 [file] [log] [blame]
{{/*
# Copyright 2019-present Open Networking Foundation
# SPDX-License-Identifier: Apache-2.0
*/}}
{{- if .Values.config.mme.deploy }}
{{- $configJson := index .Values.config.mme.cfgFiles "config.json" }}
{{- $configJsonS11 := index $configJson "s11" }}
{{- $configJsonS1ap := index $configJson "s1ap" }}
---
apiVersion: v1
kind: Service
metadata:
name: mme
labels:
{{ tuple "mme" . | include "omec-control-plane.metadata_labels" | indent 4 }}
spec:
type: {{ .Values.config.mme.serviceType }}
{{- if .Values.config.mme.externalIP }}
externalIPs:
- {{ .Values.config.mme.externalIP }}
{{- end }}
{{- if eq .Values.config.mme.serviceType "LoadBalancer" }}
{{- if .Values.config.mme.loadBalancerIP }}
loadBalancerIP: {{ .Values.config.mme.loadBalancerIP }}
{{- end }}
{{- end }}
selector:
{{ tuple "mme" . | include "omec-control-plane.metadata_labels" | indent 4 }}
ports:
- name: s11
port: {{ index $configJsonS11 "egtp_default_port" }}
protocol: UDP
{{- if eq .Values.config.mme.serviceType "NodePort" }}
{{- if .Values.config.mme.s11.nodePort }}
nodePort: {{ .Values.config.mme.s11.nodePort }}
{{- end }}
{{- end }}
- name: s6a
port: 3868
protocol: TCP
{{- if eq .Values.config.mme.serviceType "NodePort" }}
{{- if .Values.config.mme.s6a.nodePort }}
nodePort: {{ .Values.config.mme.s6a.nodePort }}
{{- end }}
{{- end }}
- name: prometheus-exporter
port: {{ .Values.config.mme.prometheus.port }}
protocol: TCP
{{- if eq .Values.config.mme.serviceType "NodePort" }}
{{- if .Values.config.mme.prometheus.nodePort }}
nodePort: {{ .Values.config.mme.prometheus.nodePort }}
{{- end }}
{{- end }}
- name: s1ap
port: {{ index $configJsonS1ap "sctp_port" }}
protocol: SCTP
{{- if eq .Values.config.mme.serviceType "NodePort" }}
{{- if .Values.config.mme.s1ap.nodePort }}
nodePort: {{ .Values.config.mme.s1ap.nodePort }}
{{- end }}
{{- end }}
- name: mme-app-config
port: 8080
protocol: TCP
- name: mme-s1ap-config
port: 8081
protocol: TCP
{{- end }}