Jeremy Ronquillo | 223db00 | 2020-06-05 10:28:22 -0700 | [diff] [blame] | 1 | {{/* |
Jeremy Ronquillo | ec2d3e4 | 2020-06-05 11:33:39 -0700 | [diff] [blame] | 2 | # Copyright 2019-present Open Networking Foundation |
Jeremy Ronquillo | 223db00 | 2020-06-05 10:28:22 -0700 | [diff] [blame] | 3 | |
Jeremy Ronquillo | 6046ce3 | 2020-06-18 11:06:29 -0700 | [diff] [blame] | 4 | # SPDX-License-Identifier: LicenseRef-ONF-Member-Only-1.0 |
Jeremy Ronquillo | 223db00 | 2020-06-05 10:28:22 -0700 | [diff] [blame] | 5 | */}} |
| 6 | |
| 7 | {{- $configJson := index .Values.config.mme.cfgFiles "config.json" }} |
| 8 | {{- $configJsonS11 := index $configJson "s11" }} |
| 9 | {{- $configJsonS1ap := index $configJson "s1ap" }} |
| 10 | --- |
| 11 | apiVersion: v1 |
| 12 | kind: Service |
| 13 | metadata: |
| 14 | name: mme |
| 15 | labels: |
| 16 | {{ tuple "mme" . | include "omec-control-plane.metadata_labels" | indent 4 }} |
| 17 | spec: |
| 18 | selector: |
| 19 | {{ tuple "mme" . | include "omec-control-plane.metadata_labels" | indent 4 }} |
| 20 | type: ClusterIP |
| 21 | ports: |
| 22 | - name: s11 |
| 23 | port: {{ index $configJsonS11 "egtp_default_port" }} |
| 24 | protocol: UDP |
| 25 | - name: s6a |
| 26 | port: 3868 |
| 27 | protocol: TCP |
| 28 | - name: s1ap |
| 29 | port: {{ index $configJsonS1ap "sctp_port" }} |
| 30 | protocol: SCTP |
| 31 | {{- if .Values.prometheusExporter.mme.enabled }} |
| 32 | - name: exporter |
| 33 | port: 3081 |
| 34 | protocol: TCP |
| 35 | {{- end }} |
| 36 | --- |
| 37 | apiVersion: v1 |
| 38 | kind: Service |
| 39 | metadata: |
| 40 | name: mme-headless |
| 41 | labels: |
| 42 | {{ tuple "mme" . | include "omec-control-plane.metadata_labels" | indent 4 }} |
| 43 | spec: |
| 44 | selector: |
| 45 | {{ tuple "mme" . | include "omec-control-plane.metadata_labels" | indent 4 }} |
| 46 | clusterIP: None |
| 47 | ports: |
| 48 | - name: s11 |
| 49 | port: {{ index $configJsonS11 "egtp_default_port" }} |
| 50 | protocol: UDP |
| 51 | - name: s6a |
| 52 | port: 3868 |
| 53 | protocol: TCP |
| 54 | - name: s1ap |
| 55 | port: {{ index $configJsonS1ap "sctp_port" }} |
| 56 | protocol: SCTP |
| 57 | --- |
| 58 | apiVersion: v1 |
| 59 | kind: Service |
| 60 | metadata: |
| 61 | name: mme-external |
| 62 | labels: |
| 63 | {{ tuple "mme" . | include "omec-control-plane.metadata_labels" | indent 4 }} |
| 64 | spec: |
| 65 | selector: |
| 66 | {{ tuple "mme" . | include "omec-control-plane.metadata_labels" | indent 4 }} |
| 67 | type: NodePort |
| 68 | ports: |
| 69 | {{- if .Values.config.mme.s11.nodePort.enabled }} |
| 70 | - name: s11 |
| 71 | port: {{ index $configJsonS11 "egtp_default_port" }} |
| 72 | protocol: UDP |
| 73 | nodePort: {{ .Values.config.mme.s11.nodePort.port }} |
| 74 | {{- end }} |
| 75 | {{- if .Values.config.mme.s6a.nodePort.enabled }} |
| 76 | - name: s6a |
| 77 | port: 3868 |
| 78 | protocol: TCP |
| 79 | nodePort: {{ .Values.config.mme.s6a.nodePort.port }} |
| 80 | {{- end }} |
| 81 | - name: s1ap |
| 82 | port: {{ index $configJsonS1ap "sctp_port" }} |
| 83 | nodePort: {{ index $configJsonS1ap "sctp_port_external" }} |
| 84 | protocol: SCTP |
| 85 | {{- if .Values.prometheusExporter.mme.enabled }} |
| 86 | - name: exporter |
| 87 | port: 3081 |
| 88 | nodePort: {{ .Values.prometheusExporter.mme.port }} |
| 89 | protocol: TCP |
| 90 | {{- end }} |