initial sdcore-helm-charts update
Change-Id: I91788de083b0f906ce4b32ac226f616fb2647ef9
diff --git a/omec-control-plane/templates/service-spgwc.yaml b/omec-control-plane/templates/service-spgwc.yaml
new file mode 100644
index 0000000..c97689a
--- /dev/null
+++ b/omec-control-plane/templates/service-spgwc.yaml
@@ -0,0 +1,81 @@
+{{/*
+# Copyright 2019-present Open Networking Foundation
+
+# SPDX-License-Identifier: LicenseRef-ONF-Member-Only-1.0
+*/}}
+
+{{- if .Values.config.spgwc.deploy }}
+---
+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: s11
+ port: {{ .Values.config.spgwc.s11.port }}
+ protocol: UDP
+ - name: pfcp
+ port: {{ .Values.config.spgwc.n4.port }}
+ protocol: UDP
+ - name: prometheus-exporter
+ port: {{ .Values.config.spgwc.prometheus.port }}
+ protocol: TCP
+ - name: rest
+ port: {{ .Values.config.spgwc.rest.port }}
+ protocol: TCP
+---
+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 }}
+{{- 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 }}
+---
+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.s11.nodePort.enabled }}
+ - name: s11
+ port: {{ .Values.config.spgwc.s11.port }}
+ protocol: UDP
+ nodePort: {{ .Values.config.spgwc.s11.nodePort.port }}
+{{- end }}
+{{- if .Values.config.spgwc.n4.nodePort.enabled }}
+ - name: pfcp
+ port: {{ .Values.config.spgwc.n4.port }}
+ protocol: UDP
+ nodePort: {{ .Values.config.spgwc.n4.nodePort.port }}
+{{- end }}
+{{- if .Values.config.spgwc.prometheus.nodePort.enabled }}
+ - name: prometheus-exporter
+ port: {{ .Values.config.spgwc.prometheus.port }}
+ protocol: TCP
+ nodePort: {{ .Values.config.spgwc.prometheus.nodePort.port }}
+{{- end }}
+{{- if .Values.config.spgwc.rest.nodePort.enabled }}
+ - name: rest
+ port: {{ .Values.config.spgwc.rest.port }}
+ protocol: TCP
+ nodePort: {{ .Values.config.spgwc.rest.nodePort.port }}
+{{- end }}
+{{- end }}
+{{- end }}