blob: 9fa454f199a5f46d0aec5726807fcbf9fcb5ebce [file] [log] [blame]
Jeremy Ronquillo223db002020-06-05 10:28:22 -07001{{/*
Jeremy Ronquilloec2d3e42020-06-05 11:33:39 -07002# Copyright 2019-present Open Networking Foundation
Jeremy Ronquillo223db002020-06-05 10:28:22 -07003
Jeremy Ronquillo6046ce32020-06-18 11:06:29 -07004# SPDX-License-Identifier: LicenseRef-ONF-Member-Only-1.0
Jeremy Ronquillo223db002020-06-05 10:28:22 -07005*/}}
6
7{{- $configJson := index .Values.config.mme.cfgFiles "config.json" }}
8{{- $configJsonS11 := index $configJson "s11" }}
9{{- $configJsonS1ap := index $configJson "s1ap" }}
10---
11apiVersion: v1
12kind: Service
13metadata:
14 name: mme
15 labels:
16{{ tuple "mme" . | include "omec-control-plane.metadata_labels" | indent 4 }}
17spec:
18 selector:
19{{ tuple "mme" . | include "omec-control-plane.metadata_labels" | indent 4 }}
20 type: ClusterIP
21 ports:
22 - name: s11
23 port: {{ index $configJsonS11 "egtp_default_port" }}
24 protocol: UDP
25 - name: s6a
26 port: 3868
27 protocol: TCP
28 - name: s1ap
29 port: {{ index $configJsonS1ap "sctp_port" }}
30 protocol: SCTP
31{{- if .Values.prometheusExporter.mme.enabled }}
32 - name: exporter
33 port: 3081
34 protocol: TCP
35{{- end }}
36---
37apiVersion: v1
38kind: Service
39metadata:
40 name: mme-headless
41 labels:
42{{ tuple "mme" . | include "omec-control-plane.metadata_labels" | indent 4 }}
43spec:
44 selector:
45{{ tuple "mme" . | include "omec-control-plane.metadata_labels" | indent 4 }}
46 clusterIP: None
47 ports:
48 - name: s11
49 port: {{ index $configJsonS11 "egtp_default_port" }}
50 protocol: UDP
51 - name: s6a
52 port: 3868
53 protocol: TCP
54 - name: s1ap
55 port: {{ index $configJsonS1ap "sctp_port" }}
56 protocol: SCTP
57---
58apiVersion: v1
59kind: Service
60metadata:
61 name: mme-external
62 labels:
63{{ tuple "mme" . | include "omec-control-plane.metadata_labels" | indent 4 }}
64spec:
65 selector:
66{{ tuple "mme" . | include "omec-control-plane.metadata_labels" | indent 4 }}
67 type: NodePort
68 ports:
69 {{- if .Values.config.mme.s11.nodePort.enabled }}
70 - name: s11
71 port: {{ index $configJsonS11 "egtp_default_port" }}
72 protocol: UDP
73 nodePort: {{ .Values.config.mme.s11.nodePort.port }}
74 {{- end }}
75 {{- if .Values.config.mme.s6a.nodePort.enabled }}
76 - name: s6a
77 port: 3868
78 protocol: TCP
79 nodePort: {{ .Values.config.mme.s6a.nodePort.port }}
80 {{- end }}
81 - name: s1ap
82 port: {{ index $configJsonS1ap "sctp_port" }}
83 nodePort: {{ index $configJsonS1ap "sctp_port_external" }}
84 protocol: SCTP
85 {{- if .Values.prometheusExporter.mme.enabled }}
86 - name: exporter
87 port: 3081
88 nodePort: {{ .Values.prometheusExporter.mme.port }}
89 protocol: TCP
90 {{- end }}