blob: aeb8f5bc7943ea8d37cfc7db56b179fd77b67f28 [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
30---
31apiVersion: v1
32kind: Service
33metadata:
34 name: spgwc-headless
35 labels:
36{{ tuple "spgwc" . | include "omec-control-plane.metadata_labels" | indent 4 }}
37spec:
38 clusterIP: None
39 selector:
40{{ tuple "spgwc" . | include "omec-control-plane.metadata_labels" | indent 4 }}
41 ports:
42 - name: cp-comm
43 port: {{ .Values.config.spgwc.cpComm.port }}
44{{- if .Values.config.spgwc.multiUpfs }}
45 protocol: TCP
46{{- else }}
47 protocol: UDP
48{{- end }}
49 - name: s11
50 port: {{ .Values.config.spgwc.s11.port }}
51 protocol: UDP
52{{- if not .Values.config.spgwc.multiUpfs }}
53{{- if or .Values.config.spgwc.cpComm.nodePort.enabled .Values.config.spgwc.s11.nodePort.enabled }}
54---
55apiVersion: v1
56kind: Service
57metadata:
58 name: spgwc-external
59 labels:
60{{ tuple "spgwc" . | include "omec-control-plane.metadata_labels" | indent 4 }}
61spec:
62 type: NodePort
63 selector:
64{{ tuple "spgwc" . | include "omec-control-plane.metadata_labels" | indent 4 }}
65 ports:
66{{- if .Values.config.spgwc.cpComm.nodePort.enabled }}
67 - name: cp-comm
68 port: {{ .Values.config.spgwc.cpComm.port }}
69 protocol: TCP
70{{- end }}
71{{- if .Values.config.spgwc.s11.nodePort.enabled }}
72 - name: s11
73 port: {{ .Values.config.spgwc.s11.port }}
74 protocol: UDP
75{{- end }}
76{{- end }}
77{{- end }}
Hyunsun Moon83ff7352020-07-09 11:03:52 -070078{{- end }}