Skip to content

Commit

Permalink
[prometheus-node-exporter] Allow to opt-out node exporter rootfs mount (
Browse files Browse the repository at this point in the history
#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]>
  • Loading branch information
davgia and Bismarck Paliz authored Mar 18, 2021
1 parent 3edc07f commit 201e9e8
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 1 deletion.
2 changes: 1 addition & 1 deletion charts/prometheus-node-exporter/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ apiVersion: v1
appVersion: 1.1.2
description: A Helm chart for prometheus node-exporter
name: prometheus-node-exporter
version: 1.16.0
version: 1.16.1
home: https://github.com/prometheus/node_exporter/
sources:
- https://github.com/prometheus/node_exporter/
Expand Down
6 changes: 6 additions & 0 deletions charts/prometheus-node-exporter/templates/daemonset.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,9 @@ spec:
args:
- --path.procfs=/host/proc
- --path.sysfs=/host/sys
{{- if .Values.hostRootFsMount }}
- --path.rootfs=/host/root
{{- end }}
- --web.listen-address=$(HOST_IP):{{ .Values.service.port }}
{{- if .Values.extraArgs }}
{{ toYaml .Values.extraArgs | indent 12 }}
Expand Down Expand Up @@ -77,10 +79,12 @@ spec:
- name: sys
mountPath: /host/sys
readOnly: true
{{- if .Values.hostRootFsMount }}
- name: root
mountPath: /host/root
mountPropagation: HostToContainer
readOnly: true
{{- end }}
{{- if .Values.extraHostVolumeMounts }}
{{- range $_, $mount := .Values.extraHostVolumeMounts }}
- name: {{ $mount.name }}
Expand Down Expand Up @@ -146,9 +150,11 @@ spec:
- name: sys
hostPath:
path: /sys
{{- if .Values.hostRootFsMount }}
- name: root
hostPath:
path: /
{{- end }}
{{- if .Values.extraHostVolumeMounts }}
{{- range $_, $mount := .Values.extraHostVolumeMounts }}
- name: {{ $mount.name }}
Expand Down
4 changes: 4 additions & 0 deletions charts/prometheus-node-exporter/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,10 @@ endpoints: []
# Expose the service to the host network
hostNetwork: true

## If true, node-exporter pods mounts host / at /host/root
##
hostRootFsMount: true

## Assign a group of affinity scheduling rules
##
affinity: {}
Expand Down

0 comments on commit 201e9e8

Please sign in to comment.