From 65a6c8dcb36199de902126fda92e0046dc910914 Mon Sep 17 00:00:00 2001 From: Arthur Le Roux <46853649+capuche2412@users.noreply.github.com> Date: Mon, 29 Jan 2024 19:22:44 +0100 Subject: [PATCH] [prometheus-systemd-exporter] allow mount extraVolumes (#4137) * feat(systemd-exporter): allow mount extraVolumes Signed-off-by: Arthur Le Roux * Update charts/prometheus-systemd-exporter/templates/daemonset.yaml Co-authored-by: zeritti <47476160+zeritti@users.noreply.github.com> Signed-off-by: Arthur Le Roux <46853649+capuche2412@users.noreply.github.com> Signed-off-by: Arthur Le Roux * Update charts/prometheus-systemd-exporter/templates/daemonset.yaml Co-authored-by: zeritti <47476160+zeritti@users.noreply.github.com> Signed-off-by: Arthur Le Roux <46853649+capuche2412@users.noreply.github.com> Signed-off-by: Arthur Le Roux * Update charts/prometheus-systemd-exporter/values.yaml Co-authored-by: zeritti <47476160+zeritti@users.noreply.github.com> Signed-off-by: Arthur Le Roux <46853649+capuche2412@users.noreply.github.com> Signed-off-by: Arthur Le Roux * Update charts/prometheus-systemd-exporter/values.yaml Co-authored-by: zeritti <47476160+zeritti@users.noreply.github.com> Signed-off-by: Arthur Le Roux <46853649+capuche2412@users.noreply.github.com> Signed-off-by: Arthur Le Roux * fix: fix typo Signed-off-by: Arthur Le Roux --------- Signed-off-by: Arthur Le Roux Signed-off-by: Arthur Le Roux <46853649+capuche2412@users.noreply.github.com> Co-authored-by: zeritti <47476160+zeritti@users.noreply.github.com> --- charts/prometheus-systemd-exporter/Chart.yaml | 2 +- .../prometheus-systemd-exporter/templates/daemonset.yaml | 6 ++++++ charts/prometheus-systemd-exporter/values.yaml | 9 +++++++++ 3 files changed, 16 insertions(+), 1 deletion(-) diff --git a/charts/prometheus-systemd-exporter/Chart.yaml b/charts/prometheus-systemd-exporter/Chart.yaml index e8c4ee9c9a0b..1506dc5fc3c4 100644 --- a/charts/prometheus-systemd-exporter/Chart.yaml +++ b/charts/prometheus-systemd-exporter/Chart.yaml @@ -2,7 +2,7 @@ apiVersion: v2 name: prometheus-systemd-exporter description: A Helm chart for prometheus systemd-exporter type: application -version: 0.1.1 +version: 0.2.0 appVersion: "0.6.0" home: https://github.com/prometheus-community/systemd_exporter sources: diff --git a/charts/prometheus-systemd-exporter/templates/daemonset.yaml b/charts/prometheus-systemd-exporter/templates/daemonset.yaml index 976eb015a1e4..c85b0e3c2cc0 100644 --- a/charts/prometheus-systemd-exporter/templates/daemonset.yaml +++ b/charts/prometheus-systemd-exporter/templates/daemonset.yaml @@ -81,6 +81,9 @@ spec: - name: systemd mountPath: /host/systemd readOnly: true + {{- with .Values.extraVolumeMounts }} + {{- toYaml . | nindent 12 }} + {{- end }} hostNetwork: {{ .Values.hostNetwork }} hostPID: {{ .Values.hostPID }} {{- with .Values.affinity }} @@ -102,3 +105,6 @@ spec: - name: systemd hostPath: path: /run/systemd + {{- with .Values.extraVolumes }} + {{- toYaml . | nindent 8 }} + {{- end }} diff --git a/charts/prometheus-systemd-exporter/values.yaml b/charts/prometheus-systemd-exporter/values.yaml index b7efdd07eda4..c6e4b4b005a7 100644 --- a/charts/prometheus-systemd-exporter/values.yaml +++ b/charts/prometheus-systemd-exporter/values.yaml @@ -179,3 +179,12 @@ readinessProbe: periodSeconds: 10 successThreshold: 1 timeoutSeconds: 1 + +extraVolumes: [] + # - name: systemd-example + # hostPath: + # path: /var/run/example +extraVolumeMounts: [] + # - mountPath: /var/run/example + # name: systemd-example + # readOnly: true