blob: 082a7bc0aefb91022482badbdb6fccfc7e19f9c3 [file] [log] [blame]
badhri854c028b32021-11-03 18:24:05 -05001{{/*
2# Copyright 2019-present Open Networking Foundation
3
Ajay Lotan Thakurb050aa62022-02-11 13:14:48 -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:
16 type: ClusterIP
17 selector:
18{{ tuple "spgwc" . | include "omec-control-plane.metadata_labels" | indent 4 }}
19 ports:
20 - name: s11
21 port: {{ .Values.config.spgwc.s11.port }}
22 protocol: UDP
23 - name: pfcp
24 port: {{ .Values.config.spgwc.n4.port }}
25 protocol: UDP
26 - name: prometheus-exporter
27 port: {{ .Values.config.spgwc.prometheus.port }}
28 protocol: TCP
29 - name: rest
30 port: {{ .Values.config.spgwc.rest.port }}
31 protocol: TCP
32---
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 }}
43{{- 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 }}
44---
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:
56{{- 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 }}
68{{- 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 }}
74{{- if .Values.config.spgwc.rest.nodePort.enabled }}
75 - name: rest
76 port: {{ .Values.config.spgwc.rest.port }}
77 protocol: TCP
78 nodePort: {{ .Values.config.spgwc.rest.nodePort.port }}
79{{- end }}
80{{- end }}
81{{- end }}