Hyunsun Moon | 06f9855 | 2019-08-15 13:44:47 -0600 | [diff] [blame] | 1 | {{/* |
| 2 | Copyright 2019-present Open Networking Foundation |
Hyunsun Moon | 636e17d | 2019-07-03 12:52:15 -0500 | [diff] [blame] | 3 | |
Hyunsun Moon | 06f9855 | 2019-08-15 13:44:47 -0600 | [diff] [blame] | 4 | Licensed under the Apache License, Version 2.0 (the "License"); |
| 5 | you may not use this file except in compliance with the License. |
| 6 | You may obtain a copy of the License at |
| 7 | |
| 8 | http://www.apache.org/licenses/LICENSE-2.0 |
| 9 | |
| 10 | Unless required by applicable law or agreed to in writing, software |
| 11 | distributed under the License is distributed on an "AS IS" BASIS, |
| 12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 13 | See the License for the specific language governing permissions and |
| 14 | limitations under the License. |
| 15 | */}} |
| 16 | |
Hyunsun Moon | ed24cac | 2019-08-26 20:52:20 -0500 | [diff] [blame] | 17 | {{- $configJson := index .Values.config.mme.cfgFiles "config.json" }} |
| 18 | {{- $configJsonS11 := index $configJson "s11" }} |
| 19 | {{- $configJsonS1ap := index $configJson "s1ap" }} |
| 20 | --- |
Hyunsun Moon | 636e17d | 2019-07-03 12:52:15 -0500 | [diff] [blame] | 21 | apiVersion: v1 |
| 22 | kind: Service |
| 23 | metadata: |
Hyunsun Moon | 834c28f | 2019-12-05 18:26:22 -0800 | [diff] [blame] | 24 | name: mme |
Hyunsun Moon | 06f9855 | 2019-08-15 13:44:47 -0600 | [diff] [blame] | 25 | labels: |
Hyunsun Moon | 7a007bb | 2019-08-19 16:41:36 -0600 | [diff] [blame] | 26 | {{ tuple "mme" . | include "omec-control-plane.metadata_labels" | indent 4 }} |
Hyunsun Moon | 636e17d | 2019-07-03 12:52:15 -0500 | [diff] [blame] | 27 | spec: |
| 28 | selector: |
Hyunsun Moon | 7a007bb | 2019-08-19 16:41:36 -0600 | [diff] [blame] | 29 | {{ tuple "mme" . | include "omec-control-plane.metadata_labels" | indent 4 }} |
Hyunsun Moon | 834c28f | 2019-12-05 18:26:22 -0800 | [diff] [blame] | 30 | type: ClusterIP |
Hyunsun Moon | 636e17d | 2019-07-03 12:52:15 -0500 | [diff] [blame] | 31 | ports: |
Hyunsun Moon | 834c28f | 2019-12-05 18:26:22 -0800 | [diff] [blame] | 32 | - name: s11 |
| 33 | port: {{ index $configJsonS11 "egtp_default_port" }} |
| 34 | protocol: UDP |
| 35 | - name: s6a |
| 36 | port: 3868 |
| 37 | protocol: TCP |
| 38 | - name: s1ap |
| 39 | port: {{ index $configJsonS1ap "sctp_port" }} |
| 40 | protocol: SCTP |
Woojoong Kim | f6ba870 | 2020-01-24 12:49:05 -0800 | [diff] [blame] | 41 | {{- if .Values.prometheusExporter.mme.enabled }} |
| 42 | - name: exporter |
| 43 | port: 3081 |
| 44 | protocol: TCP |
| 45 | {{- end }} |
Hyunsun Moon | 834c28f | 2019-12-05 18:26:22 -0800 | [diff] [blame] | 46 | --- |
| 47 | apiVersion: v1 |
| 48 | kind: Service |
| 49 | metadata: |
| 50 | name: mme-headless |
| 51 | labels: |
| 52 | {{ tuple "mme" . | include "omec-control-plane.metadata_labels" | indent 4 }} |
| 53 | spec: |
| 54 | selector: |
| 55 | {{ tuple "mme" . | include "omec-control-plane.metadata_labels" | indent 4 }} |
| 56 | clusterIP: None |
| 57 | ports: |
| 58 | - name: s11 |
| 59 | port: {{ index $configJsonS11 "egtp_default_port" }} |
| 60 | protocol: UDP |
| 61 | - name: s6a |
| 62 | port: 3868 |
| 63 | protocol: TCP |
| 64 | - name: s1ap |
| 65 | port: {{ index $configJsonS1ap "sctp_port" }} |
| 66 | protocol: SCTP |
| 67 | --- |
| 68 | apiVersion: v1 |
| 69 | kind: Service |
| 70 | metadata: |
| 71 | name: mme-external |
| 72 | labels: |
| 73 | {{ tuple "mme" . | include "omec-control-plane.metadata_labels" | indent 4 }} |
| 74 | spec: |
| 75 | selector: |
| 76 | {{ tuple "mme" . | include "omec-control-plane.metadata_labels" | indent 4 }} |
| 77 | type: NodePort |
| 78 | ports: |
Hyunsun Moon | 16d7092 | 2019-08-25 04:57:25 -0500 | [diff] [blame] | 79 | {{- if .Values.config.mme.s11.nodePort.enabled }} |
Hyunsun Moon | 834c28f | 2019-12-05 18:26:22 -0800 | [diff] [blame] | 80 | - name: s11 |
| 81 | port: {{ index $configJsonS11 "egtp_default_port" }} |
| 82 | protocol: UDP |
| 83 | nodePort: {{ .Values.config.mme.s11.nodePort.port }} |
Hyunsun Moon | 16d7092 | 2019-08-25 04:57:25 -0500 | [diff] [blame] | 84 | {{- end }} |
Hyunsun Moon | ed24cac | 2019-08-26 20:52:20 -0500 | [diff] [blame] | 85 | {{- if .Values.config.mme.s6a.nodePort.enabled }} |
Hyunsun Moon | 834c28f | 2019-12-05 18:26:22 -0800 | [diff] [blame] | 86 | - name: s6a |
| 87 | port: 3868 |
| 88 | protocol: TCP |
| 89 | nodePort: {{ .Values.config.mme.s6a.nodePort.port }} |
Hyunsun Moon | ed24cac | 2019-08-26 20:52:20 -0500 | [diff] [blame] | 90 | {{- end }} |
Hyunsun Moon | 636e17d | 2019-07-03 12:52:15 -0500 | [diff] [blame] | 91 | - name: s1ap |
Hyunsun Moon | ed24cac | 2019-08-26 20:52:20 -0500 | [diff] [blame] | 92 | port: {{ index $configJsonS1ap "sctp_port" }} |
| 93 | nodePort: {{ index $configJsonS1ap "sctp_port_external" }} |
Hyunsun Moon | 636e17d | 2019-07-03 12:52:15 -0500 | [diff] [blame] | 94 | protocol: SCTP |
Woojoong Kim | f6ba870 | 2020-01-24 12:49:05 -0800 | [diff] [blame] | 95 | {{- if .Values.prometheusExporter.mme.enabled }} |
| 96 | - name: exporter |
| 97 | port: 3081 |
| 98 | nodePort: {{ .Values.prometheusExporter.mme.port }} |
| 99 | protocol: TCP |
| 100 | {{- end }} |