blob: 0e52bac3bc6db15aa9f3b55158a3f67a51e118aa [file] [log] [blame]
Jeremy Ronquillo223db002020-06-05 10:28:22 -07001{{/*
2Copyright 2019-present Open Networking Foundation
3
4Licensed under the Apache License, Version 2.0 (the "License");
5you may not use this file except in compliance with the License.
6You may obtain a copy of the License at
7
8http://www.apache.org/licenses/LICENSE-2.0
9
10Unless required by applicable law or agreed to in writing, software
11distributed under the License is distributed on an "AS IS" BASIS,
12WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13See the License for the specific language governing permissions and
14limitations under the License.
15*/}}
16
17{{- $configJson := index .Values.config.mme.cfgFiles "config.json" }}
18{{- $configJsonS11 := index $configJson "s11" }}
19{{- $configJsonS1ap := index $configJson "s1ap" }}
20---
21apiVersion: v1
22kind: Service
23metadata:
24 name: mme
25 labels:
26{{ tuple "mme" . | include "omec-control-plane.metadata_labels" | indent 4 }}
27spec:
28 selector:
29{{ tuple "mme" . | include "omec-control-plane.metadata_labels" | indent 4 }}
30 type: ClusterIP
31 ports:
32 - name: s11
33 port: {{ index $configJsonS11 "egtp_default_port" }}
34 protocol: UDP
35 - name: s6a
36 port: 3868
37 protocol: TCP
38 - name: s1ap
39 port: {{ index $configJsonS1ap "sctp_port" }}
40 protocol: SCTP
41{{- if .Values.prometheusExporter.mme.enabled }}
42 - name: exporter
43 port: 3081
44 protocol: TCP
45{{- end }}
46---
47apiVersion: v1
48kind: Service
49metadata:
50 name: mme-headless
51 labels:
52{{ tuple "mme" . | include "omec-control-plane.metadata_labels" | indent 4 }}
53spec:
54 selector:
55{{ tuple "mme" . | include "omec-control-plane.metadata_labels" | indent 4 }}
56 clusterIP: None
57 ports:
58 - name: s11
59 port: {{ index $configJsonS11 "egtp_default_port" }}
60 protocol: UDP
61 - name: s6a
62 port: 3868
63 protocol: TCP
64 - name: s1ap
65 port: {{ index $configJsonS1ap "sctp_port" }}
66 protocol: SCTP
67---
68apiVersion: v1
69kind: Service
70metadata:
71 name: mme-external
72 labels:
73{{ tuple "mme" . | include "omec-control-plane.metadata_labels" | indent 4 }}
74spec:
75 selector:
76{{ tuple "mme" . | include "omec-control-plane.metadata_labels" | indent 4 }}
77 type: NodePort
78 ports:
79 {{- if .Values.config.mme.s11.nodePort.enabled }}
80 - name: s11
81 port: {{ index $configJsonS11 "egtp_default_port" }}
82 protocol: UDP
83 nodePort: {{ .Values.config.mme.s11.nodePort.port }}
84 {{- end }}
85 {{- if .Values.config.mme.s6a.nodePort.enabled }}
86 - name: s6a
87 port: 3868
88 protocol: TCP
89 nodePort: {{ .Values.config.mme.s6a.nodePort.port }}
90 {{- end }}
91 - name: s1ap
92 port: {{ index $configJsonS1ap "sctp_port" }}
93 nodePort: {{ index $configJsonS1ap "sctp_port_external" }}
94 protocol: SCTP
95 {{- if .Values.prometheusExporter.mme.enabled }}
96 - name: exporter
97 port: 3081
98 nodePort: {{ .Values.prometheusExporter.mme.port }}
99 protocol: TCP
100 {{- end }}