Ajay Lotan Thakur | a2e2adb | 2022-06-06 13:46:30 -0600 | [diff] [blame] | 1 | {{/* |
| 2 | # Copyright 2022-present Open Networking Foundation |
| 3 | |
| 4 | # SPDX-License-Identifier: Apache-2.0 |
| 5 | */}} |
| 6 | |
| 7 | {{- if .Values.config.metricfunc.deploy }} |
| 8 | --- |
| 9 | apiVersion: v1 |
| 10 | kind: Service |
| 11 | metadata: |
| 12 | name: metricfunc |
| 13 | labels: |
| 14 | {{ tuple "metricfunc" . | include "5g-control-plane.metadata_labels" | indent 4 }} |
| 15 | spec: |
| 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 }} |