blob: 6985e22b0fecbb9c9d11e4b56c2d6a760bf6d673 [file] [log] [blame]
Hyunsun Moon06f98552019-08-15 13:44:47 -06001{{/*
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
Hyunsun Moona24d3f92019-06-19 03:04:58 -050018---
19apiVersion: v1
20kind: Service
21metadata:
Hyunsun Moon834c28f2019-12-05 18:26:22 -080022 name: spgwu
Hyunsun Moonc4a7d542019-08-22 18:53:40 -050023 labels:
24{{ tuple "spgwu" . | include "omec-data-plane.metadata_labels" | indent 4 }}
Hyunsun Moona24d3f92019-06-19 03:04:58 -050025spec:
26 selector:
Hyunsun Moon7a007bb2019-08-19 16:41:36 -060027{{ tuple "spgwu" . | include "omec-data-plane.metadata_labels" | indent 4 }}
Hyunsun Moona24d3f92019-06-19 03:04:58 -050028 ports:
Hyunsun Moonc4a7d542019-08-22 18:53:40 -050029 - name: dp-comm
Hyunsun Moon834c28f2019-12-05 18:26:22 -080030 port: {{ .Values.config.spgwu.dpComm.port }}
31{{- if .Values.config.spgwu.multiUpfs }}
32 protocol: TCP
33{{- else }}
Hyunsun Moona24d3f92019-06-19 03:04:58 -050034 protocol: UDP
Hyunsun Moon834c28f2019-12-05 18:26:22 -080035{{- 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
Hyunsun Moonc4a7d542019-08-22 18:53:40 -050071 nodePort: {{ .Values.config.spgwu.dpComm.nodePort.port }}
Hyunsun Moon834c28f2019-12-05 18:26:22 -080072{{- end }}