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: |
| 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 | - name: prometheus-exporter |
| 33 | port: {{ .Values.config.mme.prometheus.port }} |
| 34 | protocol: TCP |
| 35 | - name: mme-app-config |
| 36 | port: 8080 |
| 37 | protocol: TCP |
| 38 | - name: mme-s1ap-config |
| 39 | port: 8081 |
| 40 | protocol: TCP |
| 41 | --- |
| 42 | apiVersion: v1 |
| 43 | kind: Service |
| 44 | metadata: |
| 45 | name: mme-headless |
| 46 | labels: |
| 47 | {{ tuple "mme" . | include "omec-control-plane.metadata_labels" | indent 4 }} |
| 48 | spec: |
| 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 | --- |
| 63 | apiVersion: v1 |
| 64 | kind: Service |
| 65 | metadata: |
| 66 | name: mme-external |
| 67 | labels: |
| 68 | {{ tuple "mme" . | include "omec-control-plane.metadata_labels" | indent 4 }} |
| 69 | spec: |
| 70 | selector: |
| 71 | {{ tuple "mme" . | include "omec-control-plane.metadata_labels" | indent 4 }} |
| 72 | type: NodePort |
| 73 | ports: |
| 74 | {{- if .Values.config.mme.prometheus.nodePort.enabled }} |
| 75 | - name: prometheus-exporter |
| 76 | port: {{ .Values.config.mme.prometheus.port }} |
| 77 | protocol: TCP |
| 78 | nodePort: {{ .Values.config.mme.prometheus.nodePort.port }} |
| 79 | {{- end }} |
| 80 | {{- if .Values.config.mme.s11.nodePort.enabled }} |
| 81 | - name: s11 |
| 82 | port: {{ index $configJsonS11 "egtp_default_port" }} |
| 83 | protocol: UDP |
| 84 | nodePort: {{ .Values.config.mme.s11.nodePort.port }} |
| 85 | {{- end }} |
| 86 | {{- if .Values.config.mme.s6a.nodePort.enabled }} |
| 87 | - name: s6a |
| 88 | port: 3868 |
| 89 | protocol: TCP |
| 90 | nodePort: {{ .Values.config.mme.s6a.nodePort.port }} |
| 91 | {{- end }} |
| 92 | - name: s1ap |
| 93 | port: {{ index $configJsonS1ap "sctp_port" }} |
| 94 | nodePort: {{ index $configJsonS1ap "sctp_port_external" }} |
| 95 | protocol: SCTP |
| 96 | {{- end }} |