blob: 7d8ec89927f6b076bddfe219ef8efb390e088a82 [file] [log] [blame]
{{/*
# Copyright 2022-present Open Networking Foundation
# SPDX-License-Identifier: Apache-2.0
*/}}
{{- if .Values.config.metrics.deploy }}
---
apiVersion: v1
kind: Service
metadata:
name: metrics
labels:
{{ tuple "metrics" . | include "5g-control-plane.metadata_labels" | indent 4 }}
spec:
type: {{ .Values.config.metrics.serviceType }}
selector:
{{ tuple "metrics" . | include "5g-control-plane.metadata_labels" | indent 4 }}
ports:
- name: prometheus-exporter
port: {{ .Values.config.metrics.prometheus.port }}
protocol: TCP
{{- if eq .Values.config.metrics.serviceType "NodePort" }}
{{- if .Values.config.metrics.prometheus.nodePort }}
nodePort: {{ .Values.config.metrics.prometheus.nodePort }}
{{- end }}
{{- end }}
{{- end }}