blob: 7012f84cf0aa7e28b69256fb93ce92215af7251f [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
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:
Hyunsun Moon16d70922019-08-25 04:57:25 -050074 {{- if .Values.config.mme.s11.nodePort.enabled }}
Hyunsun Moon834c28f2019-12-05 18:26:22 -080075 - name: s11
76 port: {{ index $configJsonS11 "egtp_default_port" }}
77 protocol: UDP
78 nodePort: {{ .Values.config.mme.s11.nodePort.port }}
Hyunsun Moon16d70922019-08-25 04:57:25 -050079 {{- end }}
Hyunsun Mooned24cac2019-08-26 20:52:20 -050080 {{- if .Values.config.mme.s6a.nodePort.enabled }}
Hyunsun Moon834c28f2019-12-05 18:26:22 -080081 - name: s6a
82 port: 3868
83 protocol: TCP
84 nodePort: {{ .Values.config.mme.s6a.nodePort.port }}
Hyunsun Mooned24cac2019-08-26 20:52:20 -050085 {{- end }}
Hyunsun Moon636e17d2019-07-03 12:52:15 -050086 - name: s1ap
Hyunsun Mooned24cac2019-08-26 20:52:20 -050087 port: {{ index $configJsonS1ap "sctp_port" }}
88 nodePort: {{ index $configJsonS1ap "sctp_port_external" }}
Hyunsun Moon636e17d2019-07-03 12:52:15 -050089 protocol: SCTP