blob: 8ae95b95564f81c4807697a8597026437329728c [file] [log] [blame]
badhri854c028b32021-11-03 18:24:05 -05001{{/*
2# Copyright 2019-present Open Networking Foundation
3
4# SPDX-License-Identifier: LicenseRef-ONF-Member-Only-1.0
5*/}}
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:
19 selector:
20{{ tuple "mme" . | include "omec-control-plane.metadata_labels" | indent 4 }}
21 type: ClusterIP
22 ports:
23 - name: s11
24 port: {{ index $configJsonS11 "egtp_default_port" }}
25 protocol: UDP
26 - name: s6a
27 port: 3868
28 protocol: TCP
29 - name: s1ap
30 port: {{ index $configJsonS1ap "sctp_port" }}
31 protocol: SCTP
32 - name: prometheus-exporter
33 port: {{ .Values.config.mme.prometheus.port }}
34 protocol: TCP
35 - name: mme-app-config
36 port: 8080
37 protocol: TCP
38 - name: mme-s1ap-config
39 port: 8081
40 protocol: TCP
41---
42apiVersion: v1
43kind: Service
44metadata:
45 name: mme-headless
46 labels:
47{{ tuple "mme" . | include "omec-control-plane.metadata_labels" | indent 4 }}
48spec:
49 selector:
50{{ tuple "mme" . | include "omec-control-plane.metadata_labels" | indent 4 }}
51 clusterIP: None
52 ports:
53 - name: s11
54 port: {{ index $configJsonS11 "egtp_default_port" }}
55 protocol: UDP
56 - name: s6a
57 port: 3868
58 protocol: TCP
59 - name: s1ap
60 port: {{ index $configJsonS1ap "sctp_port" }}
61 protocol: SCTP
62---
63apiVersion: v1
64kind: Service
65metadata:
66 name: mme-external
67 labels:
68{{ tuple "mme" . | include "omec-control-plane.metadata_labels" | indent 4 }}
69spec:
70 selector:
71{{ tuple "mme" . | include "omec-control-plane.metadata_labels" | indent 4 }}
72 type: NodePort
73 ports:
74 {{- if .Values.config.mme.prometheus.nodePort.enabled }}
75 - name: prometheus-exporter
76 port: {{ .Values.config.mme.prometheus.port }}
77 protocol: TCP
78 nodePort: {{ .Values.config.mme.prometheus.nodePort.port }}
79 {{- end }}
80 {{- if .Values.config.mme.s11.nodePort.enabled }}
81 - name: s11
82 port: {{ index $configJsonS11 "egtp_default_port" }}
83 protocol: UDP
84 nodePort: {{ .Values.config.mme.s11.nodePort.port }}
85 {{- end }}
86 {{- if .Values.config.mme.s6a.nodePort.enabled }}
87 - name: s6a
88 port: 3868
89 protocol: TCP
90 nodePort: {{ .Values.config.mme.s6a.nodePort.port }}
91 {{- end }}
92 - name: s1ap
93 port: {{ index $configJsonS1ap "sctp_port" }}
94 nodePort: {{ index $configJsonS1ap "sctp_port_external" }}
95 protocol: SCTP
96{{- end }}