blob: c396d98154ad270d41251d2b038dd488c542a8ec [file] [log] [blame]
Ajay Lotan Thakura2e2adb2022-06-06 13:46:30 -06001{{/*
2# Copyright 2022-present Open Networking Foundation
3
4# SPDX-License-Identifier: Apache-2.0
5*/}}
6
7{{- if .Values.config.metricfunc.deploy }}
8---
9apiVersion: v1
10kind: Service
11metadata:
12 name: metricfunc
13 labels:
14{{ tuple "metricfunc" . | include "5g-control-plane.metadata_labels" | indent 4 }}
15spec:
16 type: {{ .Values.config.metricfunc.serviceType }}
17 selector:
18{{ tuple "metricfunc" . | include "5g-control-plane.metadata_labels" | indent 4 }}
19 ports:
20 - name: prometheus-exporter
21 port: {{ .Values.config.metricfunc.prometheus.port }}
22 protocol: TCP
23{{- if eq .Values.config.metricfunc.serviceType "NodePort" }}
24{{- if .Values.config.metricfunc.prometheus.nodePort }}
25 nodePort: {{ .Values.config.metricfunc.prometheus.nodePort }}
26{{- end }}
27{{- end }}
28{{- end }}