aboutsummaryrefslogtreecommitdiffstats
path: root/kud/tests/vnfs/comp-app/collection/app2/helm/prometheus-operator/charts/prometheus-node-exporter/templates/service.yaml
blob: b0a447fe316892eecc7f9130f19a016cc8aa3de7 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
apiVersion: v1
kind: Service
metadata:
  name: {{ template "prometheus-node-exporter.fullname" . }}
  namespace: {{ template "prometheus-node-exporter.namespace" . }}
{{- if .Values.service.annotations }}
  annotations:
{{ toYaml .Values.service.annotations | indent 4 }}
{{- end }}
  labels: {{ include "prometheus-node-exporter.labels" . | indent 4 }}
spec:
  type: {{ .Values.service.type }}
  ports:
    - port: {{ .Values.service.port }}
    {{- if ( and (eq .Values.service.type "NodePort" ) (not (empty .Values.service.nodePort)) ) }}
      nodePort: {{ .Values.service.nodePort }}
    {{- end }}
      targetPort: {{ .Values.service.targetPort }}
      protocol: TCP
      name: metrics
  selector:
    app: {{ template "prometheus-node-exporter.name" . }}
    release: {{ .Release.Name }}