1 {{- if .Values.nodeExporter.enabled -}}
2 apiVersion: {{ template "prometheus.daemonset.apiVersion" . }}
5 {{- if .Values.nodeExporter.deploymentAnnotations }}
7 {{ toYaml .Values.nodeExporter.deploymentAnnotations | indent 4 }}
10 {{- include "prometheus.nodeExporter.labels" . | nindent 4 }}
11 name: {{ template "prometheus.nodeExporter.fullname" . }}
12 {{ include "prometheus.namespace" . | indent 2 }}
16 {{- include "prometheus.nodeExporter.matchLabels" . | nindent 6 }}
17 {{- if .Values.nodeExporter.updateStrategy }}
19 {{ toYaml .Values.nodeExporter.updateStrategy | indent 4 }}
23 {{- if .Values.nodeExporter.podAnnotations }}
25 {{ toYaml .Values.nodeExporter.podAnnotations | indent 8 }}
28 {{- include "prometheus.nodeExporter.labels" . | nindent 8 }}
29 {{- if .Values.nodeExporter.pod.labels }}
30 {{ toYaml .Values.nodeExporter.pod.labels | indent 8 }}
33 serviceAccountName: {{ template "prometheus.serviceAccountName.nodeExporter" . }}
34 {{- if .Values.nodeExporter.extraInitContainers }}
36 {{ toYaml .Values.nodeExporter.extraInitContainers | indent 8 }}
38 {{- if .Values.nodeExporter.priorityClassName }}
39 priorityClassName: "{{ .Values.nodeExporter.priorityClassName }}"
42 - name: {{ template "prometheus.name" . }}-{{ .Values.nodeExporter.name }}
43 image: "{{ .Values.nodeExporter.image.repository }}:{{ .Values.nodeExporter.image.tag }}"
44 imagePullPolicy: "{{ .Values.nodeExporter.image.pullPolicy }}"
46 - --path.procfs=/host/proc
47 - --path.sysfs=/host/sys
48 {{- range $key, $value := .Values.nodeExporter.extraArgs }}
50 - --{{ $key }}={{ $value }}
58 hostPort: {{ .Values.nodeExporter.service.hostPort }}
60 {{ toYaml .Values.nodeExporter.resources | indent 12 }}
68 {{- range .Values.nodeExporter.extraHostPathMounts }}
70 mountPath: {{ .mountPath }}
71 readOnly: {{ .readOnly }}
72 {{- if .mountPropagation }}
73 mountPropagation: {{ .mountPropagation }}
76 {{- range .Values.nodeExporter.extraConfigmapMounts }}
78 mountPath: {{ .mountPath }}
79 readOnly: {{ .readOnly }}
81 {{- if .Values.imagePullSecrets }}
83 {{ toYaml .Values.imagePullSecrets | indent 2 }}
85 {{- if .Values.nodeExporter.hostNetwork }}
88 {{- if .Values.nodeExporter.hostPID }}
91 {{- if .Values.nodeExporter.tolerations }}
93 {{ toYaml .Values.nodeExporter.tolerations | indent 8 }}
95 {{- if .Values.nodeExporter.nodeSelector }}
97 {{ toYaml .Values.nodeExporter.nodeSelector | indent 8 }}
99 {{- if .Values.nodeExporter.securityContext }}
101 {{ toYaml .Values.nodeExporter.securityContext | indent 8 }}
110 {{- range .Values.nodeExporter.extraHostPathMounts }}
113 path: {{ .hostPath }}
115 {{- range .Values.nodeExporter.extraConfigmapMounts }}
118 name: {{ .configMap }}