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