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.spgwc.deploy }} |
Jeremy Ronquillo | 223db00 | 2020-06-05 10:28:22 -0700 | [diff] [blame] | 8 | --- |
| 9 | apiVersion: v1 |
| 10 | kind: Service |
| 11 | metadata: |
| 12 | name: spgwc |
| 13 | labels: |
| 14 | {{ tuple "spgwc" . | include "omec-control-plane.metadata_labels" | indent 4 }} |
| 15 | spec: |
| 16 | type: ClusterIP |
| 17 | selector: |
| 18 | {{ tuple "spgwc" . | include "omec-control-plane.metadata_labels" | indent 4 }} |
| 19 | ports: |
| 20 | - name: cp-comm |
| 21 | port: {{ .Values.config.spgwc.cpComm.port }} |
| 22 | {{- if .Values.config.spgwc.multiUpfs }} |
| 23 | protocol: TCP |
| 24 | {{- else }} |
| 25 | protocol: UDP |
| 26 | {{- end }} |
| 27 | - name: s11 |
| 28 | port: {{ .Values.config.spgwc.s11.port }} |
| 29 | protocol: UDP |
Hyunsun Moon | 11d24f9 | 2020-08-26 14:55:19 -0700 | [diff] [blame] | 30 | - name: prometheus-exporter |
| 31 | port: {{ .Values.config.spgwc.prometheus.port }} |
| 32 | protocol: TCP |
Jeremy Ronquillo | 223db00 | 2020-06-05 10:28:22 -0700 | [diff] [blame] | 33 | --- |
| 34 | apiVersion: v1 |
| 35 | kind: Service |
| 36 | metadata: |
| 37 | name: spgwc-headless |
| 38 | labels: |
| 39 | {{ tuple "spgwc" . | include "omec-control-plane.metadata_labels" | indent 4 }} |
| 40 | spec: |
| 41 | clusterIP: None |
| 42 | selector: |
| 43 | {{ tuple "spgwc" . | include "omec-control-plane.metadata_labels" | indent 4 }} |
| 44 | ports: |
| 45 | - name: cp-comm |
| 46 | port: {{ .Values.config.spgwc.cpComm.port }} |
| 47 | {{- if .Values.config.spgwc.multiUpfs }} |
| 48 | protocol: TCP |
| 49 | {{- else }} |
| 50 | protocol: UDP |
| 51 | {{- end }} |
| 52 | - name: s11 |
| 53 | port: {{ .Values.config.spgwc.s11.port }} |
| 54 | protocol: UDP |
| 55 | {{- if not .Values.config.spgwc.multiUpfs }} |
| 56 | {{- if or .Values.config.spgwc.cpComm.nodePort.enabled .Values.config.spgwc.s11.nodePort.enabled }} |
| 57 | --- |
| 58 | apiVersion: v1 |
| 59 | kind: Service |
| 60 | metadata: |
| 61 | name: spgwc-external |
| 62 | labels: |
| 63 | {{ tuple "spgwc" . | include "omec-control-plane.metadata_labels" | indent 4 }} |
| 64 | spec: |
| 65 | type: NodePort |
| 66 | selector: |
| 67 | {{ tuple "spgwc" . | include "omec-control-plane.metadata_labels" | indent 4 }} |
| 68 | ports: |
Hyunsun Moon | 11d24f9 | 2020-08-26 14:55:19 -0700 | [diff] [blame] | 69 | {{- if .Values.config.spgwc.prometheus.nodePort.enabled }} |
| 70 | - name: prometheus-exporter |
| 71 | port: {{ .Values.config.spgwc.prometheus.port }} |
| 72 | protocol: TCP |
| 73 | nodePort: {{ .Values.config.spgwc.prometheus.nodePort.port }} |
| 74 | {{- end }} |
Jeremy Ronquillo | 223db00 | 2020-06-05 10:28:22 -0700 | [diff] [blame] | 75 | {{- if .Values.config.spgwc.cpComm.nodePort.enabled }} |
| 76 | - name: cp-comm |
| 77 | port: {{ .Values.config.spgwc.cpComm.port }} |
| 78 | protocol: TCP |
| 79 | {{- end }} |
| 80 | {{- if .Values.config.spgwc.s11.nodePort.enabled }} |
| 81 | - name: s11 |
| 82 | port: {{ .Values.config.spgwc.s11.port }} |
| 83 | protocol: UDP |
| 84 | {{- end }} |
| 85 | {{- end }} |
| 86 | {{- end }} |
Hyunsun Moon | 83ff735 | 2020-07-09 11:03:52 -0700 | [diff] [blame] | 87 | {{- end }} |