badhri85 | 4c028b3 | 2021-11-03 18:24:05 -0500 | [diff] [blame] | 1 | {{/* |
| 2 | # Copyright 2019-present Open Networking Foundation |
| 3 | |
Ajay Lotan Thakur | 03189d2 | 2022-02-10 14:06:03 -0600 | [diff] [blame] | 4 | # SPDX-License-Identifier: Apache-2.0 |
badhri85 | 4c028b3 | 2021-11-03 18:24:05 -0500 | [diff] [blame] | 5 | */}} |
| 6 | |
| 7 | {{- if .Values.config.spgwc.deploy }} |
| 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: |
Hyunsun Moon | 07a193c | 2022-03-25 16:21:04 -0600 | [diff] [blame] | 16 | type: {{ .Values.config.spgwc.serviceType }} |
| 17 | {{- if .Values.config.spgwc.externalIP }} |
| 18 | externalIPs: |
| 19 | - {{ .Values.config.spgwc.externalIP }} |
| 20 | {{- end }} |
| 21 | {{- if eq .Values.config.spgwc.serviceType "LoadBalancer" }} |
| 22 | {{- if .Values.config.spgwc.loadBalancerIP }} |
| 23 | loadBalancerIP: {{ .Values.config.spgwc.loadBalancerIP }} |
| 24 | {{- end }} |
| 25 | {{- end }} |
badhri85 | 4c028b3 | 2021-11-03 18:24:05 -0500 | [diff] [blame] | 26 | selector: |
| 27 | {{ tuple "spgwc" . | include "omec-control-plane.metadata_labels" | indent 4 }} |
| 28 | ports: |
| 29 | - name: s11 |
| 30 | port: {{ .Values.config.spgwc.s11.port }} |
| 31 | protocol: UDP |
Hyunsun Moon | 07a193c | 2022-03-25 16:21:04 -0600 | [diff] [blame] | 32 | {{- if eq .Values.config.spgwc.serviceType "NodePort" }} |
| 33 | {{- if .Values.config.spgwc.s11.nodePort }} |
| 34 | nodePort: {{ .Values.config.spgwc.s11.nodePort }} |
| 35 | {{- end }} |
| 36 | {{- end }} |
badhri85 | 4c028b3 | 2021-11-03 18:24:05 -0500 | [diff] [blame] | 37 | - name: pfcp |
| 38 | port: {{ .Values.config.spgwc.n4.port }} |
| 39 | protocol: UDP |
Hyunsun Moon | 07a193c | 2022-03-25 16:21:04 -0600 | [diff] [blame] | 40 | {{- if eq .Values.config.spgwc.serviceType "NodePort" }} |
| 41 | {{- if .Values.config.spgwc.n4.nodePort }} |
| 42 | nodePort: {{ .Values.config.spgwc.n4.nodePort }} |
| 43 | {{- end }} |
| 44 | {{- end }} |
badhri85 | 4c028b3 | 2021-11-03 18:24:05 -0500 | [diff] [blame] | 45 | - name: prometheus-exporter |
| 46 | port: {{ .Values.config.spgwc.prometheus.port }} |
| 47 | protocol: TCP |
Hyunsun Moon | 07a193c | 2022-03-25 16:21:04 -0600 | [diff] [blame] | 48 | {{- if eq .Values.config.spgwc.serviceType "NodePort" }} |
| 49 | {{- if .Values.config.spgwc.prometheus.nodePort }} |
| 50 | nodePort: {{ .Values.config.spgwc.prometheus.nodePort }} |
| 51 | {{- end }} |
| 52 | {{- end }} |
badhri85 | 4c028b3 | 2021-11-03 18:24:05 -0500 | [diff] [blame] | 53 | - name: rest |
| 54 | port: {{ .Values.config.spgwc.rest.port }} |
| 55 | protocol: TCP |
Hyunsun Moon | 07a193c | 2022-03-25 16:21:04 -0600 | [diff] [blame] | 56 | {{- if eq .Values.config.spgwc.serviceType "NodePort" }} |
| 57 | {{- if .Values.config.spgwc.rest.nodePort }} |
| 58 | nodePort: {{ .Values.config.spgwc.rest.nodePort }} |
badhri85 | 4c028b3 | 2021-11-03 18:24:05 -0500 | [diff] [blame] | 59 | {{- end }} |
| 60 | {{- end }} |
| 61 | {{- end }} |