badhri85 | 4c028b3 | 2021-11-03 18:24:05 -0500 | [diff] [blame] | 1 | {{/* |
| 2 | # Copyright 2019-present Open Networking Foundation |
| 3 | |
Ajay Lotan Thakur | 03189d2 | 2022-02-10 14:06:03 -0600 | [diff] [blame] | 4 | # SPDX-License-Identifier: Apache-2.0 |
badhri85 | 4c028b3 | 2021-11-03 18:24:05 -0500 | [diff] [blame] | 5 | */}} |
| 6 | |
| 7 | {{- if .Values.config.mme.deploy }} |
| 8 | {{- $configJson := index .Values.config.mme.cfgFiles "config.json" }} |
| 9 | {{- $configJsonS11 := index $configJson "s11" }} |
| 10 | {{- $configJsonS1ap := index $configJson "s1ap" }} |
| 11 | --- |
| 12 | apiVersion: v1 |
| 13 | kind: Service |
| 14 | metadata: |
| 15 | name: mme |
| 16 | labels: |
| 17 | {{ tuple "mme" . | include "omec-control-plane.metadata_labels" | indent 4 }} |
| 18 | spec: |
Hyunsun Moon | 07a193c | 2022-03-25 16:21:04 -0600 | [diff] [blame] | 19 | type: {{ .Values.config.mme.serviceType }} |
| 20 | {{- if .Values.config.mme.externalIP }} |
| 21 | externalIPs: |
| 22 | - {{ .Values.config.mme.externalIP }} |
| 23 | {{- end }} |
| 24 | {{- if eq .Values.config.mme.serviceType "LoadBalancer" }} |
| 25 | {{- if .Values.config.mme.loadBalancerIP }} |
| 26 | loadBalancerIP: {{ .Values.config.mme.loadBalancerIP }} |
| 27 | {{- end }} |
| 28 | {{- end }} |
badhri85 | 4c028b3 | 2021-11-03 18:24:05 -0500 | [diff] [blame] | 29 | selector: |
| 30 | {{ tuple "mme" . | include "omec-control-plane.metadata_labels" | indent 4 }} |
badhri85 | 4c028b3 | 2021-11-03 18:24:05 -0500 | [diff] [blame] | 31 | ports: |
| 32 | - name: s11 |
| 33 | port: {{ index $configJsonS11 "egtp_default_port" }} |
| 34 | protocol: UDP |
Hyunsun Moon | 07a193c | 2022-03-25 16:21:04 -0600 | [diff] [blame] | 35 | {{- if eq .Values.config.mme.serviceType "NodePort" }} |
| 36 | {{- if .Values.config.mme.s11.nodePort }} |
| 37 | nodePort: {{ .Values.config.mme.s11.nodePort }} |
| 38 | {{- end }} |
| 39 | {{- end }} |
badhri85 | 4c028b3 | 2021-11-03 18:24:05 -0500 | [diff] [blame] | 40 | - name: s6a |
| 41 | port: 3868 |
| 42 | protocol: TCP |
Hyunsun Moon | 07a193c | 2022-03-25 16:21:04 -0600 | [diff] [blame] | 43 | {{- if eq .Values.config.mme.serviceType "NodePort" }} |
| 44 | {{- if .Values.config.mme.s6a.nodePort }} |
| 45 | nodePort: {{ .Values.config.mme.s6a.nodePort }} |
| 46 | {{- end }} |
| 47 | {{- end }} |
badhri85 | 4c028b3 | 2021-11-03 18:24:05 -0500 | [diff] [blame] | 48 | - name: prometheus-exporter |
| 49 | port: {{ .Values.config.mme.prometheus.port }} |
| 50 | protocol: TCP |
Hyunsun Moon | 07a193c | 2022-03-25 16:21:04 -0600 | [diff] [blame] | 51 | {{- if eq .Values.config.mme.serviceType "NodePort" }} |
| 52 | {{- if .Values.config.mme.prometheus.nodePort }} |
| 53 | nodePort: {{ .Values.config.mme.prometheus.nodePort }} |
| 54 | {{- end }} |
| 55 | {{- end }} |
| 56 | - name: s1ap |
| 57 | port: {{ index $configJsonS1ap "sctp_port" }} |
| 58 | protocol: SCTP |
| 59 | {{- if eq .Values.config.mme.serviceType "NodePort" }} |
| 60 | {{- if .Values.config.mme.s1ap.nodePort }} |
| 61 | nodePort: {{ .Values.config.mme.s1ap.nodePort }} |
| 62 | {{- end }} |
| 63 | {{- end }} |
badhri85 | 4c028b3 | 2021-11-03 18:24:05 -0500 | [diff] [blame] | 64 | - name: mme-app-config |
| 65 | port: 8080 |
| 66 | protocol: TCP |
| 67 | - name: mme-s1ap-config |
| 68 | port: 8081 |
| 69 | protocol: TCP |
badhri85 | 4c028b3 | 2021-11-03 18:24:05 -0500 | [diff] [blame] | 70 | {{- end }} |