blob: 1d112e6a1a86c4ca175369fe537f9d37cbf4b459 [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
Hyunsun Moon83ff7352020-07-09 11:03:52 -07007{{- if .Values.config.mme.deploy }}
Jeremy Ronquillo223db002020-06-05 10:28:22 -07008{{- $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{{- if .Values.prometheusExporter.mme.enabled }}
33 - name: exporter
34 port: 3081
35 protocol: TCP
36{{- end }}
37---
38apiVersion: v1
39kind: Service
40metadata:
41 name: mme-headless
42 labels:
43{{ tuple "mme" . | include "omec-control-plane.metadata_labels" | indent 4 }}
44spec:
45 selector:
46{{ tuple "mme" . | include "omec-control-plane.metadata_labels" | indent 4 }}
47 clusterIP: None
48 ports:
49 - name: s11
50 port: {{ index $configJsonS11 "egtp_default_port" }}
51 protocol: UDP
52 - name: s6a
53 port: 3868
54 protocol: TCP
55 - name: s1ap
56 port: {{ index $configJsonS1ap "sctp_port" }}
57 protocol: SCTP
58---
59apiVersion: v1
60kind: Service
61metadata:
62 name: mme-external
63 labels:
64{{ tuple "mme" . | include "omec-control-plane.metadata_labels" | indent 4 }}
65spec:
66 selector:
67{{ tuple "mme" . | include "omec-control-plane.metadata_labels" | indent 4 }}
68 type: NodePort
69 ports:
70 {{- if .Values.config.mme.s11.nodePort.enabled }}
71 - name: s11
72 port: {{ index $configJsonS11 "egtp_default_port" }}
73 protocol: UDP
74 nodePort: {{ .Values.config.mme.s11.nodePort.port }}
75 {{- end }}
76 {{- if .Values.config.mme.s6a.nodePort.enabled }}
77 - name: s6a
78 port: 3868
79 protocol: TCP
80 nodePort: {{ .Values.config.mme.s6a.nodePort.port }}
81 {{- end }}
82 - name: s1ap
83 port: {{ index $configJsonS1ap "sctp_port" }}
84 nodePort: {{ index $configJsonS1ap "sctp_port_external" }}
85 protocol: SCTP
86 {{- if .Values.prometheusExporter.mme.enabled }}
87 - name: exporter
88 port: 3081
89 nodePort: {{ .Values.prometheusExporter.mme.port }}
90 protocol: TCP
91 {{- end }}
Hyunsun Moon83ff7352020-07-09 11:03:52 -070092{{- end }}