blob: 6985e22b0fecbb9c9d11e4b56c2d6a760bf6d673 [file] [log] [blame]
Jeremy Ronquillo223db002020-06-05 10:28:22 -07001{{/*
2Copyright 2019-present Open Networking Foundation
3Copyright 2019 Intel Corporation
4
5Licensed under the Apache License, Version 2.0 (the "License");
6you may not use this file except in compliance with the License.
7You may obtain a copy of the License at
8
9http://www.apache.org/licenses/LICENSE-2.0
10
11Unless required by applicable law or agreed to in writing, software
12distributed under the License is distributed on an "AS IS" BASIS,
13WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14See the License for the specific language governing permissions and
15limitations under the License.
16*/}}
17
18---
19apiVersion: v1
20kind: Service
21metadata:
22 name: spgwu
23 labels:
24{{ tuple "spgwu" . | include "omec-data-plane.metadata_labels" | indent 4 }}
25spec:
26 selector:
27{{ tuple "spgwu" . | include "omec-data-plane.metadata_labels" | indent 4 }}
28 ports:
29 - name: dp-comm
30 port: {{ .Values.config.spgwu.dpComm.port }}
31{{- if .Values.config.spgwu.multiUpfs }}
32 protocol: TCP
33{{- else }}
34 protocol: UDP
35{{- end }}
36---
37apiVersion: v1
38kind: Service
39metadata:
40 name: spgwu-headless
41 labels:
42{{ tuple "spgwu" . | include "omec-data-plane.metadata_labels" | indent 4 }}
43spec:
44 clusterIP: None
45 selector:
46{{ tuple "spgwu" . | include "omec-data-plane.metadata_labels" | indent 4 }}
47 ports:
48 - name: dp-comm
49 port: {{ .Values.config.spgwu.dpComm.port }}
50{{- if .Values.config.spgwu.multiUpfs }}
51 protocol: TCP
52{{- else }}
53 protocol: UDP
54{{- end }}
55{{- if and (not .Values.config.spgwu.multiUpfs) .Values.config.spgwu.dpComm.nodePort.enabled }}
56---
57apiVersion: v1
58kind: Service
59metadata:
60 name: spgwu-external
61 labels:
62{{ tuple "spgwu" . | include "omec-data-plane.metadata_labels" | indent 4 }}
63spec:
64 selector:
65{{ tuple "spgwu" . | include "omec-data-plane.metadata_labels" | indent 4 }}
66 type: NodePort
67 ports:
68 - name: dp-comm
69 port: {{ .Values.config.spgwu.dpComm.port }}
70 protocol: UDP
71 nodePort: {{ .Values.config.spgwu.dpComm.nodePort.port }}
72{{- end }}