blob: 5dd3ba46ff67945075ab0fc1dba4fa715cc3c8c9 [file] [log] [blame]
Jeremy Ronquillo223db002020-06-05 10:28:22 -07001{{/*
Jeremy Ronquilloec2d3e42020-06-05 11:33:39 -07002# Copyright 2019-present Open Networking Foundation
Jeremy Ronquillo223db002020-06-05 10:28:22 -07003
Jeremy Ronquillo6046ce32020-06-18 11:06:29 -07004# SPDX-License-Identifier: LicenseRef-ONF-Member-Only-1.0
Jeremy Ronquillo223db002020-06-05 10:28:22 -07005*/}}
6
Hyunsun Moon83ff7352020-07-09 11:03:52 -07007{{- if .Values.config.spgwc.deploy }}
Jeremy Ronquillo223db002020-06-05 10:28:22 -07008---
9apiVersion: v1
10kind: Service
11metadata:
12 name: spgwc
13 labels:
14{{ tuple "spgwc" . | include "omec-control-plane.metadata_labels" | indent 4 }}
15spec:
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 Moon11d24f92020-08-26 14:55:19 -070030 - name: prometheus-exporter
31 port: {{ .Values.config.spgwc.prometheus.port }}
32 protocol: TCP
Jeremy Ronquillo223db002020-06-05 10:28:22 -070033---
34apiVersion: v1
35kind: Service
36metadata:
37 name: spgwc-headless
38 labels:
39{{ tuple "spgwc" . | include "omec-control-plane.metadata_labels" | indent 4 }}
40spec:
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---
58apiVersion: v1
59kind: Service
60metadata:
61 name: spgwc-external
62 labels:
63{{ tuple "spgwc" . | include "omec-control-plane.metadata_labels" | indent 4 }}
64spec:
65 type: NodePort
66 selector:
67{{ tuple "spgwc" . | include "omec-control-plane.metadata_labels" | indent 4 }}
68 ports:
Hyunsun Moon11d24f92020-08-26 14:55:19 -070069{{- 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 Ronquillo223db002020-06-05 10:28:22 -070075{{- 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 Moon83ff7352020-07-09 11:03:52 -070087{{- end }}