Add extensible volume mounts to node-exporter

In some instances the prometheus node-exporter provides inaccurate
feedback regarding disk usage. By adding the ability to add additional
mounts, more information about the node's filesystem can be made
available to monitoring services.

Change-Id: I5085a29683dc36099014efb1b11c7db774df501a
Co-Authored-By: Radhika Pai <rp592h@att.com>
This commit is contained in:
Steven Fitzpatrick 2019-09-26 15:06:09 -05:00
parent c3a1ae43fd
commit bcd96cf800

View File

@ -17,6 +17,8 @@ limitations under the License.
{{- if .Values.manifests.daemonset }} {{- if .Values.manifests.daemonset }}
{{- $envAll := . }} {{- $envAll := . }}
{{- $mounts_node_exporter := .Values.pod.mounts.node_exporter.node_exporter}}
{{- $serviceAccountName := printf "%s-%s" .Release.Name "node-exporter" }} {{- $serviceAccountName := printf "%s-%s" .Release.Name "node-exporter" }}
{{ tuple $envAll "node_exporter" $serviceAccountName | include "helm-toolkit.snippets.kubernetes_pod_rbac_serviceaccount" }} {{ tuple $envAll "node_exporter" $serviceAccountName | include "helm-toolkit.snippets.kubernetes_pod_rbac_serviceaccount" }}
--- ---
@ -101,6 +103,7 @@ spec:
mountPath: /tmp/node-exporter.sh mountPath: /tmp/node-exporter.sh
subPath: node-exporter.sh subPath: node-exporter.sh
readOnly: true readOnly: true
{{ if $mounts_node_exporter.volumeMounts }}{{ toYaml $mounts_node_exporter.volumeMounts | indent 12 }}{{ end }}
volumes: volumes:
- name: pod-tmp - name: pod-tmp
emptyDir: {} emptyDir: {}
@ -119,4 +122,5 @@ spec:
configMap: configMap:
name: node-exporter-bin name: node-exporter-bin
defaultMode: 0555 defaultMode: 0555
{{ if $mounts_node_exporter.volumes }}{{ toYaml $mounts_node_exporter.volumes | indent 8 }}{{ end }}
{{- end }} {{- end }}