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 | |
Hyunsun Moon | 83ff735 | 2020-07-09 11:03:52 -0700 | [diff] [blame] | 7 | {{- if .Values.config.mme.deploy }} |
Jeremy Ronquillo | 223db00 | 2020-06-05 10:28:22 -0700 | [diff] [blame] | 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 |
Hyunsun Moon | 11d24f9 | 2020-08-26 14:55:19 -0700 | [diff] [blame] | 32 | - name: prometheus-exporter |
| 33 | port: {{ .Values.config.mme.prometheus.port }} |
Jeremy Ronquillo | 223db00 | 2020-06-05 10:28:22 -0700 | [diff] [blame] | 34 | protocol: TCP |
Jeremy Ronquillo | 223db00 | 2020-06-05 10:28:22 -0700 | [diff] [blame] | 35 | --- |
| 36 | apiVersion: v1 |
| 37 | kind: Service |
| 38 | metadata: |
| 39 | name: mme-headless |
| 40 | labels: |
| 41 | {{ tuple "mme" . | include "omec-control-plane.metadata_labels" | indent 4 }} |
| 42 | spec: |
| 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 | --- |
| 57 | apiVersion: v1 |
| 58 | kind: Service |
| 59 | metadata: |
| 60 | name: mme-external |
| 61 | labels: |
| 62 | {{ tuple "mme" . | include "omec-control-plane.metadata_labels" | indent 4 }} |
| 63 | spec: |
| 64 | selector: |
| 65 | {{ tuple "mme" . | include "omec-control-plane.metadata_labels" | indent 4 }} |
| 66 | type: NodePort |
| 67 | ports: |
Hyunsun Moon | 11d24f9 | 2020-08-26 14:55:19 -0700 | [diff] [blame] | 68 | {{- 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 Ronquillo | 223db00 | 2020-06-05 10:28:22 -0700 | [diff] [blame] | 74 | {{- 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 Moon | 83ff735 | 2020-07-09 11:03:52 -0700 | [diff] [blame] | 90 | {{- end }} |