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 |
| 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: |
Hyunsun Moon | 16d7092 | 2019-08-25 04:57:25 -0500 | [diff] [blame] | 74 | {{- if .Values.config.mme.s11.nodePort.enabled }} |
Hyunsun Moon | 834c28f | 2019-12-05 18:26:22 -0800 | [diff] [blame] | 75 | - name: s11 |
| 76 | port: {{ index $configJsonS11 "egtp_default_port" }} |
| 77 | protocol: UDP |
| 78 | nodePort: {{ .Values.config.mme.s11.nodePort.port }} |
Hyunsun Moon | 16d7092 | 2019-08-25 04:57:25 -0500 | [diff] [blame] | 79 | {{- end }} |
Hyunsun Moon | ed24cac | 2019-08-26 20:52:20 -0500 | [diff] [blame] | 80 | {{- if .Values.config.mme.s6a.nodePort.enabled }} |
Hyunsun Moon | 834c28f | 2019-12-05 18:26:22 -0800 | [diff] [blame] | 81 | - name: s6a |
| 82 | port: 3868 |
| 83 | protocol: TCP |
| 84 | nodePort: {{ .Values.config.mme.s6a.nodePort.port }} |
Hyunsun Moon | ed24cac | 2019-08-26 20:52:20 -0500 | [diff] [blame] | 85 | {{- end }} |
Hyunsun Moon | 636e17d | 2019-07-03 12:52:15 -0500 | [diff] [blame] | 86 | - name: s1ap |
Hyunsun Moon | ed24cac | 2019-08-26 20:52:20 -0500 | [diff] [blame] | 87 | port: {{ index $configJsonS1ap "sctp_port" }} |
| 88 | nodePort: {{ index $configJsonS1ap "sctp_port_external" }} |
Hyunsun Moon | 636e17d | 2019-07-03 12:52:15 -0500 | [diff] [blame] | 89 | protocol: SCTP |