blob: 5320ebaa179b3ae9ba19f800c730c91429f418d0 [file] [log] [blame]
badhri854c028b32021-11-03 18:24:05 -05001{{/*
2# Copyright 2019-present Open Networking Foundation
3
Ajay Lotan Thakur03189d22022-02-10 14:06:03 -06004# SPDX-License-Identifier: Apache-2.0
badhri854c028b32021-11-03 18:24:05 -05005*/}}
6
7{{- if .Values.config.spgwc.deploy }}
8---
9apiVersion: v1
10kind: Service
11metadata:
12 name: spgwc
13 labels:
14{{ tuple "spgwc" . | include "omec-control-plane.metadata_labels" | indent 4 }}
15spec:
Hyunsun Moon07a193c2022-03-25 16:21:04 -060016 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 }}
badhri854c028b32021-11-03 18:24:05 -050026 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 Moon07a193c2022-03-25 16:21:04 -060032{{- 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 }}
badhri854c028b32021-11-03 18:24:05 -050037 - name: pfcp
38 port: {{ .Values.config.spgwc.n4.port }}
39 protocol: UDP
Hyunsun Moon07a193c2022-03-25 16:21:04 -060040{{- 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 }}
badhri854c028b32021-11-03 18:24:05 -050045 - name: prometheus-exporter
46 port: {{ .Values.config.spgwc.prometheus.port }}
47 protocol: TCP
Hyunsun Moon07a193c2022-03-25 16:21:04 -060048{{- 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 }}
badhri854c028b32021-11-03 18:24:05 -050053 - name: rest
54 port: {{ .Values.config.spgwc.rest.port }}
55 protocol: TCP
Hyunsun Moon07a193c2022-03-25 16:21:04 -060056{{- if eq .Values.config.spgwc.serviceType "NodePort" }}
57{{- if .Values.config.spgwc.rest.nodePort }}
58 nodePort: {{ .Values.config.spgwc.rest.nodePort }}
badhri854c028b32021-11-03 18:24:05 -050059{{- end }}
60{{- end }}
61{{- end }}