blob: 512ea4928f47c6868bee4167313143abfc027d55 [file] [log] [blame]
badhri854c028b32021-11-03 18:24:05 -05001{{/*
2# Copyright 2019-present Open Networking Foundation
3
Ajay Lotan Thakur03189d22022-02-10 14:06:03 -06004# SPDX-License-Identifier: Apache-2.0
badhri854c028b32021-11-03 18:24:05 -05005*/}}
6
7{{- if .Values.config.mme.deploy }}
8{{- $configJson := index .Values.config.mme.cfgFiles "config.json" }}
9{{- $configJsonS11 := index $configJson "s11" }}
10{{- $configJsonS1ap := index $configJson "s1ap" }}
11---
12apiVersion: v1
13kind: Service
14metadata:
15 name: mme
16 labels:
17{{ tuple "mme" . | include "omec-control-plane.metadata_labels" | indent 4 }}
18spec:
Hyunsun Moon07a193c2022-03-25 16:21:04 -060019 type: {{ .Values.config.mme.serviceType }}
20{{- if .Values.config.mme.externalIP }}
21 externalIPs:
22 - {{ .Values.config.mme.externalIP }}
23{{- end }}
24{{- if eq .Values.config.mme.serviceType "LoadBalancer" }}
25{{- if .Values.config.mme.loadBalancerIP }}
26 loadBalancerIP: {{ .Values.config.mme.loadBalancerIP }}
27{{- end }}
28{{- end }}
badhri854c028b32021-11-03 18:24:05 -050029 selector:
30{{ tuple "mme" . | include "omec-control-plane.metadata_labels" | indent 4 }}
badhri854c028b32021-11-03 18:24:05 -050031 ports:
32 - name: s11
33 port: {{ index $configJsonS11 "egtp_default_port" }}
34 protocol: UDP
Hyunsun Moon07a193c2022-03-25 16:21:04 -060035{{- if eq .Values.config.mme.serviceType "NodePort" }}
36{{- if .Values.config.mme.s11.nodePort }}
37 nodePort: {{ .Values.config.mme.s11.nodePort }}
38{{- end }}
39{{- end }}
badhri854c028b32021-11-03 18:24:05 -050040 - name: s6a
41 port: 3868
42 protocol: TCP
Hyunsun Moon07a193c2022-03-25 16:21:04 -060043{{- if eq .Values.config.mme.serviceType "NodePort" }}
44{{- if .Values.config.mme.s6a.nodePort }}
45 nodePort: {{ .Values.config.mme.s6a.nodePort }}
46{{- end }}
47{{- end }}
badhri854c028b32021-11-03 18:24:05 -050048 - name: prometheus-exporter
49 port: {{ .Values.config.mme.prometheus.port }}
50 protocol: TCP
Hyunsun Moon07a193c2022-03-25 16:21:04 -060051{{- if eq .Values.config.mme.serviceType "NodePort" }}
52{{- if .Values.config.mme.prometheus.nodePort }}
53 nodePort: {{ .Values.config.mme.prometheus.nodePort }}
54{{- end }}
55{{- end }}
56 - name: s1ap
57 port: {{ index $configJsonS1ap "sctp_port" }}
58 protocol: SCTP
59{{- if eq .Values.config.mme.serviceType "NodePort" }}
60{{- if .Values.config.mme.s1ap.nodePort }}
61 nodePort: {{ .Values.config.mme.s1ap.nodePort }}
62{{- end }}
63{{- end }}
badhri854c028b32021-11-03 18:24:05 -050064 - name: mme-app-config
65 port: 8080
66 protocol: TCP
67 - name: mme-s1ap-config
68 port: 8081
69 protocol: TCP
badhri854c028b32021-11-03 18:24:05 -050070{{- end }}