From aa862a34701e9e9fa14010ccb9b6d74dd8c48e63 Mon Sep 17 00:00:00 2001 From: Joe Mifsud Date: Sun, 10 Nov 2024 20:37:34 -0500 Subject: [PATCH] Add support for device-include / device-exclude and image pull secrets Signed-off-by: Joe Mifsud --- charts/prometheus-smartctl-exporter/Chart.yaml | 2 +- .../templates/daemonset.yaml | 12 ++++++++++++ 2 files changed, 13 insertions(+), 1 deletion(-) diff --git a/charts/prometheus-smartctl-exporter/Chart.yaml b/charts/prometheus-smartctl-exporter/Chart.yaml index 769d96d4260b..d4f04c933318 100644 --- a/charts/prometheus-smartctl-exporter/Chart.yaml +++ b/charts/prometheus-smartctl-exporter/Chart.yaml @@ -15,7 +15,7 @@ type: application # This is the chart version. This version number should be incremented each time you make changes # to the chart and its templates, including the app version. # Versions are expected to follow Semantic Versioning (https://semver.org/) -version: 0.11.0 +version: 0.11.1 # This is the version number of the application being deployed. This version number should be # incremented each time you make changes to the application. Versions are not expected to diff --git a/charts/prometheus-smartctl-exporter/templates/daemonset.yaml b/charts/prometheus-smartctl-exporter/templates/daemonset.yaml index 1500c092698e..1aefec512ee5 100644 --- a/charts/prometheus-smartctl-exporter/templates/daemonset.yaml +++ b/charts/prometheus-smartctl-exporter/templates/daemonset.yaml @@ -35,12 +35,24 @@ spec: {{- include "prometheus-smartctl-exporter.selectorLabels" $global | nindent 8 }} idx: i{{ $idx }} spec: + {{- if $global.Values.image.pullSecrets }} + imagePullSecrets: + {{- range $secret := $global.Values.image.pullSecrets }} + - name: {{ $secret }} + {{- end }} + {{- end }} containers: - image: "{{ $global.Values.image.repository }}:{{ $global.Values.image.tag | default $global.Chart.AppVersion }}" imagePullPolicy: {{ $global.Values.image.pullPolicy }} args: - '--smartctl.path={{ $config.smartctl_location }}' - '--smartctl.interval={{ $config.collect_not_more_than_period }}' +{{- if $config.device_exclude }} + - '--smartctl.device-exclude={{ $config.device_exclude }}' +{{- end }} +{{- if $config.device_include }} + - '--smartctl.device-include={{ $config.device_include }}' +{{- end }} {{ range $config.devices }} - '--smartctl.device={{ . }}' {{ end }}