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