blob: 467c2eae7f814a5ae5843996082a8fb07db38109 [file] [log] [blame]
{{/*
# Copyright 2020-present Open Networking Foundation
# SPDX-License-Identifier: LicenseRef-ONF-Member-Only-1.0
*/}}
{{- if .Values.config.smf.deploy }}
---
apiVersion: v1
kind: Service
metadata:
name: smf
labels:
{{ tuple "smf" . | include "5g-control-plane.metadata_labels" | indent 4 }}
spec:
type: ClusterIP
selector:
{{ tuple "smf" . | include "5g-control-plane.metadata_labels" | indent 4 }}
ports:
- name: pfcp
port: {{ .Values.config.smf.n4.port }}
protocol: UDP
- name: prometheus-exporter
port: {{ .Values.config.smf.prometheus.port }}
protocol: TCP
- name: sbi
port: {{ .Values.config.smf.sbi.port }}
protocol: TCP
---
apiVersion: v1
kind: Service
metadata:
name: smf-headless
labels:
{{ tuple "smf" . | include "5g-control-plane.metadata_labels" | indent 4 }}
spec:
clusterIP: None
selector:
{{ tuple "smf" . | include "5g-control-plane.metadata_labels" | indent 4 }}
{{- if or .Values.config.smf.n4.nodePort.enabled .Values.config.smf.prometheus.nodePort.enabled .Values.config.smf.sbi.nodePort.enabled }}
---
apiVersion: v1
kind: Service
metadata:
name: smf-external
labels:
{{ tuple "smf" . | include "5g-control-plane.metadata_labels" | indent 4 }}
spec:
type: NodePort
selector:
{{ tuple "smf" . | include "5g-control-plane.metadata_labels" | indent 4 }}
ports:
{{- if .Values.config.smf.n4.nodePort.enabled }}
- name: pfcp
port: {{ .Values.config.smf.n4.port }}
protocol: UDP
nodePort: {{ .Values.config.smf.n4.nodePort.port }}
{{- end }}
{{- if .Values.config.smf.prometheus.nodePort.enabled }}
- name: prometheus-exporter
port: {{ .Values.config.smf.prometheus.port }}
protocol: TCP
nodePort: {{ .Values.config.smf.prometheus.nodePort.port }}
{{- end }}
{{- if .Values.config.smf.sbi.nodePort.enabled }}
- name: sbi
port: {{ .Values.config.smf.sbi.port }}
protocol: TCP
nodePort: {{ .Values.config.smf.sbi.nodePort.port }}
{{- end }}
{{- end }}
{{- end }}