dashboard: allow collecting stats from the host

This commit makes podman bindmount `/:/rootfs:ro` so the container can
collect data from the host.

Closes: https://bugzilla.redhat.com/show_bug.cgi?id=2028775

Signed-off-by: Guillaume Abrioux <gabrioux@redhat.com>
(cherry picked from commit 0f34cd16d8)
pull/7159/head
Guillaume Abrioux 2021-12-07 15:43:45 +01:00
parent bc84a1cc31
commit 79b1ad47a1
1 changed files with 5 additions and 3 deletions

View File

@ -23,11 +23,13 @@ ExecStart=/usr/bin/{{ container_binary }} run --rm --name=node-exporter \
{% endif %}
--pids-limit={{ 0 if container_binary == 'podman' else -1 }} \
--privileged \
-v /proc:/host/proc:ro -v /sys:/host/sys:ro \
--security-opt label=disable \
-v /:/rootfs:ro \
--net=host \
{{ node_exporter_container_image }} \
--path.procfs=/host/proc \
--path.sysfs=/host/sys \
--path.procfs=/rootfs/proc \
--path.sysfs=/rootfs/sys \
--path.rootfs=/rootfs \
--no-collector.timex \
--web.listen-address=:{{ node_exporter_port }}
{% if container_binary == 'podman' %}