Skip to content

Commit 201e9e8

Browse files
davgiaBismarck Paliz
and
Bismarck Paliz
authored
[prometheus-node-exporter] Allow to opt-out node exporter rootfs mount (#757)
* [prometheus-node-exporter] make path.rootfs mount conditional Signed-off-by: Davide Giacomini <[email protected]> * [prometheus-node-exporter] bump minor version Signed-off-by: Davide Giacomini <[email protected]> * [prometheus-node-exporter] bump minor version (instead of patch) Signed-off-by: Davide Giacomini <[email protected]> * [prometheus-node-exporter] bump patch version Signed-off-by: Davide Giacomini <[email protected]> Co-authored-by: Bismarck Paliz <[email protected]>
1 parent 3edc07f commit 201e9e8

File tree

3 files changed

+11
-1
lines changed

3 files changed

+11
-1
lines changed

charts/prometheus-node-exporter/Chart.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ apiVersion: v1
22
appVersion: 1.1.2
33
description: A Helm chart for prometheus node-exporter
44
name: prometheus-node-exporter
5-
version: 1.16.0
5+
version: 1.16.1
66
home: https://github.com/prometheus/node_exporter/
77
sources:
88
- https://github.com/prometheus/node_exporter/

charts/prometheus-node-exporter/templates/daemonset.yaml

+6
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,9 @@ spec:
3838
args:
3939
- --path.procfs=/host/proc
4040
- --path.sysfs=/host/sys
41+
{{- if .Values.hostRootFsMount }}
4142
- --path.rootfs=/host/root
43+
{{- end }}
4244
- --web.listen-address=$(HOST_IP):{{ .Values.service.port }}
4345
{{- if .Values.extraArgs }}
4446
{{ toYaml .Values.extraArgs | indent 12 }}
@@ -77,10 +79,12 @@ spec:
7779
- name: sys
7880
mountPath: /host/sys
7981
readOnly: true
82+
{{- if .Values.hostRootFsMount }}
8083
- name: root
8184
mountPath: /host/root
8285
mountPropagation: HostToContainer
8386
readOnly: true
87+
{{- end }}
8488
{{- if .Values.extraHostVolumeMounts }}
8589
{{- range $_, $mount := .Values.extraHostVolumeMounts }}
8690
- name: {{ $mount.name }}
@@ -146,9 +150,11 @@ spec:
146150
- name: sys
147151
hostPath:
148152
path: /sys
153+
{{- if .Values.hostRootFsMount }}
149154
- name: root
150155
hostPath:
151156
path: /
157+
{{- end }}
152158
{{- if .Values.extraHostVolumeMounts }}
153159
{{- range $_, $mount := .Values.extraHostVolumeMounts }}
154160
- name: {{ $mount.name }}

charts/prometheus-node-exporter/values.yaml

+4
Original file line numberDiff line numberDiff line change
@@ -80,6 +80,10 @@ endpoints: []
8080
# Expose the service to the host network
8181
hostNetwork: true
8282

83+
## If true, node-exporter pods mounts host / at /host/root
84+
##
85+
hostRootFsMount: true
86+
8387
## Assign a group of affinity scheduling rules
8488
##
8589
affinity: {}

0 commit comments

Comments
 (0)