blob: 8e9d50dc67c6f3490604b6dbd2a844d41c4b89ff [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
{{- 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 }}