blob: c97689a2162e973744cec5e0b1fd2b7536ca2905 [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:
Jeremy Ronquillo223db002020-06-05 10:28:22 -070020 - name: s11
21 port: {{ .Values.config.spgwc.s11.port }}
22 protocol: UDP
Hyunsun Moon7f03a772020-09-27 23:23:50 -050023 - name: pfcp
24 port: {{ .Values.config.spgwc.n4.port }}
25 protocol: UDP
Hyunsun Moon11d24f92020-08-26 14:55:19 -070026 - name: prometheus-exporter
27 port: {{ .Values.config.spgwc.prometheus.port }}
28 protocol: TCP
Hyunsun Moon7f03a772020-09-27 23:23:50 -050029 - name: rest
30 port: {{ .Values.config.spgwc.rest.port }}
Ajay Lotan Thakur97278fa2020-09-21 17:31:51 -050031 protocol: TCP
Jeremy Ronquillo223db002020-06-05 10:28:22 -070032---
33apiVersion: v1
34kind: Service
35metadata:
36 name: spgwc-headless
37 labels:
38{{ tuple "spgwc" . | include "omec-control-plane.metadata_labels" | indent 4 }}
39spec:
40 clusterIP: None
41 selector:
42{{ tuple "spgwc" . | include "omec-control-plane.metadata_labels" | indent 4 }}
Hyunsun Moon7f03a772020-09-27 23:23:50 -050043{{- if or .Values.config.spgwc.s11.nodePort.enabled .Values.config.spgwc.n4.nodePort.enabled .Values.config.spgwc.prometheus.nodePort.enabled .Values.config.spgwc.rest.nodePort.enabled }}
Jeremy Ronquillo223db002020-06-05 10:28:22 -070044---
45apiVersion: v1
46kind: Service
47metadata:
48 name: spgwc-external
49 labels:
50{{ tuple "spgwc" . | include "omec-control-plane.metadata_labels" | indent 4 }}
51spec:
52 type: NodePort
53 selector:
54{{ tuple "spgwc" . | include "omec-control-plane.metadata_labels" | indent 4 }}
55 ports:
Hyunsun Moon7f03a772020-09-27 23:23:50 -050056{{- if .Values.config.spgwc.s11.nodePort.enabled }}
57 - name: s11
58 port: {{ .Values.config.spgwc.s11.port }}
59 protocol: UDP
60 nodePort: {{ .Values.config.spgwc.s11.nodePort.port }}
61{{- end }}
62{{- if .Values.config.spgwc.n4.nodePort.enabled }}
63 - name: pfcp
64 port: {{ .Values.config.spgwc.n4.port }}
65 protocol: UDP
66 nodePort: {{ .Values.config.spgwc.n4.nodePort.port }}
67{{- end }}
Hyunsun Moon11d24f92020-08-26 14:55:19 -070068{{- if .Values.config.spgwc.prometheus.nodePort.enabled }}
69 - name: prometheus-exporter
70 port: {{ .Values.config.spgwc.prometheus.port }}
71 protocol: TCP
72 nodePort: {{ .Values.config.spgwc.prometheus.nodePort.port }}
73{{- end }}
Hyunsun Moon7f03a772020-09-27 23:23:50 -050074{{- if .Values.config.spgwc.rest.nodePort.enabled }}
75 - name: rest
76 port: {{ .Values.config.spgwc.rest.port }}
Jeremy Ronquillo223db002020-06-05 10:28:22 -070077 protocol: TCP
Hyunsun Moon7f03a772020-09-27 23:23:50 -050078 nodePort: {{ .Values.config.spgwc.rest.nodePort.port }}
Jeremy Ronquillo223db002020-06-05 10:28:22 -070079{{- end }}
80{{- end }}
Hyunsun Moon83ff7352020-07-09 11:03:52 -070081{{- end }}