Skip to content

Commit 46c8e5a

Browse files
radhusmonotek
andauthored
[prometheus] make path.rootfs conditional (#737)
* [prometheus] make path.rootfs condition Not always possible to mount / from host, see issue #467 Signed-off-by: William Johansson <[email protected]> * [prometheus] bump minor version Signed-off-by: William Johansson <[email protected]> * [prometheus] bump minor version Signed-off-by: William Johansson <[email protected]> Co-authored-by: André Bauer <[email protected]>
1 parent 0ec6d33 commit 46c8e5a

File tree

3 files changed

+11
-1
lines changed

3 files changed

+11
-1
lines changed

charts/prometheus/Chart.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
apiVersion: v2
22
name: prometheus
3-
version: 13.5.0
43
appVersion: 2.24.0
4+
version: 13.6.0
55
description: Prometheus is a monitoring system and time series database.
66
home: https://prometheus.io/
77
icon: https://raw.githubusercontent.com/prometheus/prometheus.github.io/master/assets/prometheus_logo-cb55bb5c346.png

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

+6
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,9 @@ spec:
4545
args:
4646
- --path.procfs=/host/proc
4747
- --path.sysfs=/host/sys
48+
{{- if .Values.nodeExporter.hostRootfs }}
4849
- --path.rootfs=/host/root
50+
{{- end }}
4951
{{- if .Values.nodeExporter.hostNetwork }}
5052
- --web.listen-address=:{{ .Values.nodeExporter.service.hostPort }}
5153
{{- end }}
@@ -73,10 +75,12 @@ spec:
7375
- name: sys
7476
mountPath: /host/sys
7577
readOnly: true
78+
{{- if .Values.nodeExporter.hostRootfs }}
7679
- name: root
7780
mountPath: /host/root
7881
mountPropagation: HostToContainer
7982
readOnly: true
83+
{{- end }}
8084
{{- range .Values.nodeExporter.extraHostPathMounts }}
8185
- name: {{ .name }}
8286
mountPath: {{ .mountPath }}
@@ -123,9 +127,11 @@ spec:
123127
- name: sys
124128
hostPath:
125129
path: /sys
130+
{{- if .Values.nodeExporter.hostRootfs }}
126131
- name: root
127132
hostPath:
128133
path: /
134+
{{- end }}
129135
{{- range .Values.nodeExporter.extraHostPathMounts }}
130136
- name: {{ .name }}
131137
hostPath:

charts/prometheus/values.yaml

+4
Original file line numberDiff line numberDiff line change
@@ -442,6 +442,10 @@ nodeExporter:
442442
##
443443
hostPID: true
444444

445+
## If true, node-exporter pods mounts host / at /host/root
446+
##
447+
hostRootfs: true
448+
445449
## node-exporter container name
446450
##
447451
name: node-exporter

0 commit comments

Comments
 (0)