blob: fe1e68c2e32d5f39e8477820f6affa7c1d02afb3 [file] [log] [blame]
Hyunsun Moon16d70922019-08-25 04:57:25 -05001{{/*
2Copyright 2019-present Open Networking Foundation
3
4Licensed under the Apache License, Version 2.0 (the "License");
5you may not use this file except in compliance with the License.
6You may obtain a copy of the License at
7
8http://www.apache.org/licenses/LICENSE-2.0
9
10Unless required by applicable law or agreed to in writing, software
11distributed under the License is distributed on an "AS IS" BASIS,
12WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13See the License for the specific language governing permissions and
14limitations under the License.
15*/}}
16
17---
18apiVersion: v1
19kind: Service
20metadata:
Hyunsun Moon834c28f2019-12-05 18:26:22 -080021 name: spgwc
Hyunsun Moon16d70922019-08-25 04:57:25 -050022 labels:
23{{ tuple "spgwc" . | include "omec-control-plane.metadata_labels" | indent 4 }}
24spec:
Hyunsun Moon834c28f2019-12-05 18:26:22 -080025 type: ClusterIP
Hyunsun Moon16d70922019-08-25 04:57:25 -050026 selector:
27{{ tuple "spgwc" . | include "omec-control-plane.metadata_labels" | indent 4 }}
Hyunsun Moon16d70922019-08-25 04:57:25 -050028 ports:
29 - name: cp-comm
Hyunsun Moon834c28f2019-12-05 18:26:22 -080030 port: {{ .Values.config.spgwc.cpComm.port }}
31{{- if .Values.config.spgwc.multiUpfs }}
32 protocol: TCP
33{{- else }}
Hyunsun Moon16d70922019-08-25 04:57:25 -050034 protocol: UDP
Hyunsun Moon834c28f2019-12-05 18:26:22 -080035{{- end }}
36 - name: s11
37 port: {{ .Values.config.spgwc.s11.port }}
38 protocol: UDP
Hyunsun Moon16d70922019-08-25 04:57:25 -050039---
40apiVersion: v1
41kind: Service
42metadata:
Hyunsun Moon834c28f2019-12-05 18:26:22 -080043 name: spgwc-headless
Hyunsun Moon16d70922019-08-25 04:57:25 -050044 labels:
45{{ tuple "spgwc" . | include "omec-control-plane.metadata_labels" | indent 4 }}
46spec:
Hyunsun Moon834c28f2019-12-05 18:26:22 -080047 clusterIP: None
Hyunsun Moon16d70922019-08-25 04:57:25 -050048 selector:
49{{ tuple "spgwc" . | include "omec-control-plane.metadata_labels" | indent 4 }}
Hyunsun Moon16d70922019-08-25 04:57:25 -050050 ports:
Hyunsun Moon834c28f2019-12-05 18:26:22 -080051 - name: cp-comm
52 port: {{ .Values.config.spgwc.cpComm.port }}
53{{- if .Values.config.spgwc.multiUpfs }}
54 protocol: TCP
55{{- else }}
Hyunsun Moon16d70922019-08-25 04:57:25 -050056 protocol: UDP
Hyunsun Moon834c28f2019-12-05 18:26:22 -080057{{- end }}
58 - name: s11
59 port: {{ .Values.config.spgwc.s11.port }}
60 protocol: UDP
61{{- if not .Values.config.spgwc.multiUpfs }}
62{{- if or .Values.config.spgwc.cpComm.nodePort.enabled .Values.config.spgwc.s11.nodePort.enabled }}
63---
64apiVersion: v1
65kind: Service
66metadata:
67 name: spgwc-external
68 labels:
69{{ tuple "spgwc" . | include "omec-control-plane.metadata_labels" | indent 4 }}
70spec:
71 type: NodePort
72 selector:
73{{ tuple "spgwc" . | include "omec-control-plane.metadata_labels" | indent 4 }}
74 ports:
75{{- if .Values.config.spgwc.cpComm.nodePort.enabled }}
76 - name: cp-comm
77 port: {{ .Values.config.spgwc.cpComm.port }}
78 protocol: TCP
79{{- end }}
80{{- if .Values.config.spgwc.s11.nodePort.enabled }}
81 - name: s11
82 port: {{ .Values.config.spgwc.s11.port }}
83 protocol: UDP
84{{- end }}
85{{- end }}
86{{- end }}