109 lines
3.6 KiB
YAML
Executable File
109 lines
3.6 KiB
YAML
Executable File
{{- if .Values.nodeExporter.enabled -}}
|
|
apiVersion: extensions/v1beta1
|
|
kind: DaemonSet
|
|
metadata:
|
|
{{- if .Values.nodeExporter.deploymentAnnotations }}
|
|
annotations:
|
|
{{ toYaml .Values.nodeExporter.deploymentAnnotations | indent 4 }}
|
|
{{- end }}
|
|
labels:
|
|
app: {{ template "prometheus.name" . }}
|
|
chart: {{ .Chart.Name }}-{{ .Chart.Version }}
|
|
component: "{{ .Values.nodeExporter.name }}"
|
|
heritage: {{ .Release.Service }}
|
|
release: {{ .Release.Name }}
|
|
name: {{ template "prometheus.nodeExporter.fullname" . }}
|
|
spec:
|
|
{{- if .Values.nodeExporter.updateStrategy }}
|
|
updateStrategy:
|
|
{{ toYaml .Values.nodeExporter.updateStrategy | indent 4 }}
|
|
{{- end }}
|
|
template:
|
|
metadata:
|
|
{{- if .Values.nodeExporter.podAnnotations }}
|
|
annotations:
|
|
{{ toYaml .Values.nodeExporter.podAnnotations | indent 8 }}
|
|
{{- end }}
|
|
labels:
|
|
app: {{ template "prometheus.name" . }}
|
|
component: "{{ .Values.nodeExporter.name }}"
|
|
release: {{ .Release.Name }}
|
|
{{- if .Values.nodeExporter.pod.labels }}
|
|
{{ toYaml .Values.nodeExporter.pod.labels | indent 8 }}
|
|
{{- end }}
|
|
spec:
|
|
serviceAccountName: {{ template "prometheus.serviceAccountName.nodeExporter" . }}
|
|
{{- if .Values.nodeExporter.priorityClassName }}
|
|
priorityClassName: "{{ .Values.nodeExporter.priorityClassName }}"
|
|
{{- end }}
|
|
containers:
|
|
- name: {{ template "prometheus.name" . }}-{{ .Values.nodeExporter.name }}
|
|
image: "{{ .Values.nodeExporter.image.repository }}:{{ .Values.nodeExporter.image.tag }}"
|
|
imagePullPolicy: "{{ .Values.nodeExporter.image.pullPolicy }}"
|
|
args:
|
|
- --path.procfs=/host/proc
|
|
- --path.sysfs=/host/sys
|
|
{{- range $key, $value := .Values.nodeExporter.extraArgs }}
|
|
{{- if $value }}
|
|
- --{{ $key }}={{ $value }}
|
|
{{- else }}
|
|
- --{{ $key }}
|
|
{{- end }}
|
|
{{- end }}
|
|
ports:
|
|
- name: metrics
|
|
containerPort: 9100
|
|
hostPort: {{ .Values.nodeExporter.service.hostPort }}
|
|
resources:
|
|
{{ toYaml .Values.nodeExporter.resources | indent 12 }}
|
|
volumeMounts:
|
|
- name: proc
|
|
mountPath: /host/proc
|
|
readOnly: true
|
|
- name: sys
|
|
mountPath: /host/sys
|
|
readOnly: true
|
|
{{- range .Values.nodeExporter.extraHostPathMounts }}
|
|
- name: {{ .name }}
|
|
mountPath: {{ .mountPath }}
|
|
readOnly: {{ .readOnly }}
|
|
{{- end }}
|
|
{{- range .Values.nodeExporter.extraConfigmapMounts }}
|
|
- name: {{ .name }}
|
|
mountPath: {{ .mountPath }}
|
|
readOnly: {{ .readOnly }}
|
|
{{- end }}
|
|
hostNetwork: true
|
|
hostPID: true
|
|
{{- if .Values.nodeExporter.tolerations }}
|
|
tolerations:
|
|
{{ toYaml .Values.nodeExporter.tolerations | indent 8 }}
|
|
{{- end }}
|
|
{{- if .Values.nodeExporter.nodeSelector }}
|
|
nodeSelector:
|
|
{{ toYaml .Values.nodeExporter.nodeSelector | indent 8 }}
|
|
{{- end }}
|
|
{{- if .Values.nodeExporter.securityContext }}
|
|
securityContext:
|
|
{{ toYaml .Values.nodeExporter.securityContext | indent 8 }}
|
|
{{- end }}
|
|
volumes:
|
|
- name: proc
|
|
hostPath:
|
|
path: /proc
|
|
- name: sys
|
|
hostPath:
|
|
path: /sys
|
|
{{- range .Values.nodeExporter.extraHostPathMounts }}
|
|
- name: {{ .name }}
|
|
hostPath:
|
|
path: {{ .hostPath }}
|
|
{{- end }}
|
|
{{- range .Values.nodeExporter.extraConfigmapMounts }}
|
|
- name: {{ .name }}
|
|
configMap:
|
|
name: {{ .configMap }}
|
|
{{- end }}
|
|
|
|
{{- end -}}
|