From c1dbc3aac304594dfbda8a3a1ad3285e789198c1 Mon Sep 17 00:00:00 2001 From: William Johansson Date: Sun, 7 Mar 2021 17:16:01 +0100 Subject: [PATCH 1/3] [prometheus] make path.rootfs condition Not always possible to mount / from host, see issue #467 Signed-off-by: William Johansson --- charts/prometheus/Chart.yaml | 2 +- charts/prometheus/templates/node-exporter/daemonset.yaml | 6 ++++++ charts/prometheus/values.yaml | 4 ++++ 3 files changed, 11 insertions(+), 1 deletion(-) diff --git a/charts/prometheus/Chart.yaml b/charts/prometheus/Chart.yaml index 528e09148b2..e5249cd551b 100644 --- a/charts/prometheus/Chart.yaml +++ b/charts/prometheus/Chart.yaml @@ -1,6 +1,6 @@ apiVersion: v2 name: prometheus -version: 13.4.0 +version: 13.4.1 appVersion: 2.24.0 description: Prometheus is a monitoring system and time series database. home: https://prometheus.io/ diff --git a/charts/prometheus/templates/node-exporter/daemonset.yaml b/charts/prometheus/templates/node-exporter/daemonset.yaml index 6a0eb96ec3a..667be9f499d 100644 --- a/charts/prometheus/templates/node-exporter/daemonset.yaml +++ b/charts/prometheus/templates/node-exporter/daemonset.yaml @@ -45,7 +45,9 @@ spec: args: - --path.procfs=/host/proc - --path.sysfs=/host/sys + {{- if .Values.nodeExporter.hostRootfs }} - --path.rootfs=/host/root + {{- end }} {{- if .Values.nodeExporter.hostNetwork }} - --web.listen-address=:{{ .Values.nodeExporter.service.hostPort }} {{- end }} @@ -73,10 +75,12 @@ spec: - name: sys mountPath: /host/sys readOnly: true + {{- if .Values.nodeExporter.hostRootfs }} - name: root mountPath: /host/root mountPropagation: HostToContainer readOnly: true + {{- end }} {{- range .Values.nodeExporter.extraHostPathMounts }} - name: {{ .name }} mountPath: {{ .mountPath }} @@ -123,9 +127,11 @@ spec: - name: sys hostPath: path: /sys + {{- if .Values.nodeExporter.hostRootfs }} - name: root hostPath: path: / + {{- end }} {{- range .Values.nodeExporter.extraHostPathMounts }} - name: {{ .name }} hostPath: diff --git a/charts/prometheus/values.yaml b/charts/prometheus/values.yaml index dc4fe3167d3..4b352a6de86 100644 --- a/charts/prometheus/values.yaml +++ b/charts/prometheus/values.yaml @@ -442,6 +442,10 @@ nodeExporter: ## hostPID: true + ## If true, node-exporter pods mounts host / at /host/root + ## + hostRootfs: true + ## node-exporter container name ## name: node-exporter From 6c795ab78a848f382c002d095e08b454c024b0d1 Mon Sep 17 00:00:00 2001 From: William Johansson Date: Mon, 8 Mar 2021 09:25:17 +0100 Subject: [PATCH 2/3] [prometheus] bump minor version Signed-off-by: William Johansson --- charts/prometheus/Chart.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/charts/prometheus/Chart.yaml b/charts/prometheus/Chart.yaml index e5249cd551b..a0810fab346 100644 --- a/charts/prometheus/Chart.yaml +++ b/charts/prometheus/Chart.yaml @@ -1,6 +1,6 @@ apiVersion: v2 name: prometheus -version: 13.4.1 +version: 13.5.0 appVersion: 2.24.0 description: Prometheus is a monitoring system and time series database. home: https://prometheus.io/ From 18c187704ec6049d2697acb08836b6b849064900 Mon Sep 17 00:00:00 2001 From: William Johansson Date: Mon, 8 Mar 2021 17:07:20 +0100 Subject: [PATCH 3/3] [prometheus] bump minor version Signed-off-by: William Johansson --- charts/prometheus/Chart.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/charts/prometheus/Chart.yaml b/charts/prometheus/Chart.yaml index a0810fab346..35ce37f17be 100644 --- a/charts/prometheus/Chart.yaml +++ b/charts/prometheus/Chart.yaml @@ -1,6 +1,6 @@ apiVersion: v2 name: prometheus -version: 13.5.0 +version: 13.6.0 appVersion: 2.24.0 description: Prometheus is a monitoring system and time series database. home: https://prometheus.io/