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