summaryrefslogtreecommitdiffstats
path: root/vnfs/DAaaS/collection/charts/prometheus-node-exporter/templates/service.yaml
blob: cffe547b10a26df04da08fc6166d68c579bb928b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
apiVersion: v1
kind: Service
metadata:
  name: {{ template "prometheus-node-exporter.fullname" . }}
{{- 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 }}