blob: fe1e68c2e32d5f39e8477820f6affa7c1d02afb3 [file] [log] [blame]
{{/*
Copyright 2019-present Open Networking Foundation
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/}}
---
apiVersion: v1
kind: Service
metadata:
name: spgwc
labels:
{{ tuple "spgwc" . | include "omec-control-plane.metadata_labels" | indent 4 }}
spec:
type: ClusterIP
selector:
{{ tuple "spgwc" . | include "omec-control-plane.metadata_labels" | indent 4 }}
ports:
- name: cp-comm
port: {{ .Values.config.spgwc.cpComm.port }}
{{- if .Values.config.spgwc.multiUpfs }}
protocol: TCP
{{- else }}
protocol: UDP
{{- end }}
- name: s11
port: {{ .Values.config.spgwc.s11.port }}
protocol: UDP
---
apiVersion: v1
kind: Service
metadata:
name: spgwc-headless
labels:
{{ tuple "spgwc" . | include "omec-control-plane.metadata_labels" | indent 4 }}
spec:
clusterIP: None
selector:
{{ tuple "spgwc" . | include "omec-control-plane.metadata_labels" | indent 4 }}
ports:
- name: cp-comm
port: {{ .Values.config.spgwc.cpComm.port }}
{{- if .Values.config.spgwc.multiUpfs }}
protocol: TCP
{{- else }}
protocol: UDP
{{- end }}
- name: s11
port: {{ .Values.config.spgwc.s11.port }}
protocol: UDP
{{- if not .Values.config.spgwc.multiUpfs }}
{{- if or .Values.config.spgwc.cpComm.nodePort.enabled .Values.config.spgwc.s11.nodePort.enabled }}
---
apiVersion: v1
kind: Service
metadata:
name: spgwc-external
labels:
{{ tuple "spgwc" . | include "omec-control-plane.metadata_labels" | indent 4 }}
spec:
type: NodePort
selector:
{{ tuple "spgwc" . | include "omec-control-plane.metadata_labels" | indent 4 }}
ports:
{{- if .Values.config.spgwc.cpComm.nodePort.enabled }}
- name: cp-comm
port: {{ .Values.config.spgwc.cpComm.port }}
protocol: TCP
{{- end }}
{{- if .Values.config.spgwc.s11.nodePort.enabled }}
- name: s11
port: {{ .Values.config.spgwc.s11.port }}
protocol: UDP
{{- end }}
{{- end }}
{{- end }}