Skip to content

Commit

Permalink
[prometheus-node-exporter] Add MountPropagation and VolumeMount Type …
Browse files Browse the repository at this point in the history
…to Daemonset (#4201)

* added params for mount type and mount propagation

Signed-off-by: Nicole <[email protected]>

* added some doc links to volume mount type

Signed-off-by: Nicole <[email protected]>

* added with statement for mount type so it does not have to be set

Signed-off-by: Nicole <[email protected]>

* added with statement to make type optional and not be set

Signed-off-by: Nicole <[email protected]>

* update version

Signed-off-by: Nicole <[email protected]>

* disable sysfsmount

Signed-off-by: Nicole <[email protected]>

* moved type from volumemounts to volumes

Signed-off-by: Nicole <[email protected]>

* spacing changes, deindentation changes

Signed-off-by: Nicole <[email protected]>

---------

Signed-off-by: Nicole <[email protected]>
  • Loading branch information
nfrazier08 authored Feb 6, 2024
1 parent 5bd2f82 commit 7d561fa
Show file tree
Hide file tree
Showing 3 changed files with 22 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 @@ -6,7 +6,7 @@ keywords:
- prometheus
- exporter
type: application
version: 4.27.0
version: 4.28.0
appVersion: 1.7.0
home: https://github.com/prometheus/node_exporter/
sources:
Expand Down
9 changes: 9 additions & 0 deletions charts/prometheus-node-exporter/templates/daemonset.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -136,9 +136,15 @@ spec:
volumeMounts:
- name: proc
mountPath: /host/proc
{{- with .Values.hostProcFsMount.mountPropagation }}
mountPropagation: {{ . }}
{{- end }}
readOnly: true
- name: sys
mountPath: /host/sys
{{- with .Values.hostSysFsMount.mountPropagation }}
mountPropagation: {{ . }}
{{- end }}
readOnly: true
{{- if .Values.hostRootFsMount.enabled }}
- name: root
Expand Down Expand Up @@ -267,6 +273,9 @@ spec:
- name: {{ $mount.name }}
hostPath:
path: {{ $mount.hostPath }}
{{- with $mount.type }}
type: {{ . }}
{{- end }}
{{- end }}
{{- range $_, $mount := .Values.sidecarVolumeMount }}
- name: {{ $mount.name }}
Expand Down
12 changes: 12 additions & 0 deletions charts/prometheus-node-exporter/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -317,6 +317,16 @@ hostRootFsMount:
# https://kubernetes.io/docs/concepts/storage/volumes/#mount-propagation
mountPropagation: HostToContainer

# Mount the node's proc file system (/proc) at /host/proc in the container
hostProcFsMount:
# Possible values are None, HostToContainer, and Bidirectional
mountPropagation: ""

# Mount the node's sys file system (/sys) at /host/sys in the container
hostSysFsMount:
# Possible values are None, HostToContainer, and Bidirectional
mountPropagation: ""

## Assign a group of affinity scheduling rules
##
affinity: {}
Expand Down Expand Up @@ -392,6 +402,8 @@ extraArgs: []
extraHostVolumeMounts: []
# - name: <mountName>
# hostPath: <hostPath>
# https://kubernetes.io/docs/concepts/storage/volumes/#hostpath-volume-types
# type: "" (Default)|DirectoryOrCreate|Directory|FileOrCreate|File|Socket|CharDevice|BlockDevice
# mountPath: <mountPath>
# readOnly: true|false
# mountPropagation: None|HostToContainer|Bidirectional
Expand Down

0 comments on commit 7d561fa

Please sign in to comment.