blob: 0e52bac3bc6db15aa9f3b55158a3f67a51e118aa [file] [log] [blame]
Hyunsun Moon06f98552019-08-15 13:44:47 -06001{{/*
2Copyright 2019-present Open Networking Foundation
Hyunsun Moon636e17d2019-07-03 12:52:15 -05003
Hyunsun Moon06f98552019-08-15 13:44:47 -06004Licensed 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
Hyunsun Mooned24cac2019-08-26 20:52:20 -050017{{- $configJson := index .Values.config.mme.cfgFiles "config.json" }}
18{{- $configJsonS11 := index $configJson "s11" }}
19{{- $configJsonS1ap := index $configJson "s1ap" }}
20---
Hyunsun Moon636e17d2019-07-03 12:52:15 -050021apiVersion: v1
22kind: Service
23metadata:
Hyunsun Moon834c28f2019-12-05 18:26:22 -080024 name: mme
Hyunsun Moon06f98552019-08-15 13:44:47 -060025 labels:
Hyunsun Moon7a007bb2019-08-19 16:41:36 -060026{{ tuple "mme" . | include "omec-control-plane.metadata_labels" | indent 4 }}
Hyunsun Moon636e17d2019-07-03 12:52:15 -050027spec:
28 selector:
Hyunsun Moon7a007bb2019-08-19 16:41:36 -060029{{ tuple "mme" . | include "omec-control-plane.metadata_labels" | indent 4 }}
Hyunsun Moon834c28f2019-12-05 18:26:22 -080030 type: ClusterIP
Hyunsun Moon636e17d2019-07-03 12:52:15 -050031 ports:
Hyunsun Moon834c28f2019-12-05 18:26:22 -080032 - 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
Woojoong Kimf6ba8702020-01-24 12:49:05 -080041{{- if .Values.prometheusExporter.mme.enabled }}
42 - name: exporter
43 port: 3081
44 protocol: TCP
45{{- end }}
Hyunsun Moon834c28f2019-12-05 18:26:22 -080046---
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:
Hyunsun Moon16d70922019-08-25 04:57:25 -050079 {{- if .Values.config.mme.s11.nodePort.enabled }}
Hyunsun Moon834c28f2019-12-05 18:26:22 -080080 - name: s11
81 port: {{ index $configJsonS11 "egtp_default_port" }}
82 protocol: UDP
83 nodePort: {{ .Values.config.mme.s11.nodePort.port }}
Hyunsun Moon16d70922019-08-25 04:57:25 -050084 {{- end }}
Hyunsun Mooned24cac2019-08-26 20:52:20 -050085 {{- if .Values.config.mme.s6a.nodePort.enabled }}
Hyunsun Moon834c28f2019-12-05 18:26:22 -080086 - name: s6a
87 port: 3868
88 protocol: TCP
89 nodePort: {{ .Values.config.mme.s6a.nodePort.port }}
Hyunsun Mooned24cac2019-08-26 20:52:20 -050090 {{- end }}
Hyunsun Moon636e17d2019-07-03 12:52:15 -050091 - name: s1ap
Hyunsun Mooned24cac2019-08-26 20:52:20 -050092 port: {{ index $configJsonS1ap "sctp_port" }}
93 nodePort: {{ index $configJsonS1ap "sctp_port_external" }}
Hyunsun Moon636e17d2019-07-03 12:52:15 -050094 protocol: SCTP
Woojoong Kimf6ba8702020-01-24 12:49:05 -080095 {{- if .Values.prometheusExporter.mme.enabled }}
96 - name: exporter
97 port: 3081
98 nodePort: {{ .Values.prometheusExporter.mme.port }}
99 protocol: TCP
100 {{- end }}