kubezero/charts/kubezero-metrics/charts/kube-prometheus-stack/charts/prometheus-node-exporter/templates/service.yaml

24 lines
799 B
YAML
Raw Normal View History

apiVersion: v1
kind: Service
metadata:
2022-12-06 20:43:11 +00:00
name: {{ include "prometheus-node-exporter.fullname" . }}
namespace: {{ include "prometheus-node-exporter.namespace" . }}
labels:
{{- include "prometheus-node-exporter.labels" $ | nindent 4 }}
{{- with .Values.service.annotations }}
annotations:
2022-12-06 20:43:11 +00:00
{{- toYaml . | nindent 4 }}
{{- end }}
spec:
type: {{ .Values.service.type }}
ports:
- port: {{ .Values.service.port }}
2022-12-06 20:43:11 +00:00
{{- if ( and (eq .Values.service.type "NodePort" ) (not (empty .Values.service.nodePort)) ) }}
nodePort: {{ .Values.service.nodePort }}
2022-12-06 20:43:11 +00:00
{{- end }}
targetPort: {{ .Values.service.targetPort }}
protocol: TCP
2021-12-09 18:03:55 +00:00
name: {{ .Values.service.portName }}
selector:
2022-12-06 20:43:11 +00:00
{{- include "prometheus-node-exporter.selectorLabels" . | nindent 4 }}