Skip to content

Commit 62c5049

Browse files
committed
feat: allow extending smartctl drivedb via configmap
Signed-off-by: Robin Björklin <[email protected]>
1 parent 956cd56 commit 62c5049

File tree

3 files changed

+23
-0
lines changed

3 files changed

+23
-0
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
{{- if ne .Values.drivedb "" }}
2+
apiVersion: v1
3+
kind: ConfigMap
4+
metadata:
5+
name: {{ template "prometheus-smartctl-exporter.fullname" . }}-drivedb
6+
labels:
7+
{{- include "prometheus-smartctl-exporter.labels" . | nindent 4 }}
8+
data:
9+
smart_drivedb.h: |
10+
{{- .Values.drivedb | nindent 4 }}
11+
{{- end }}

charts/prometheus-smartctl-exporter/templates/daemonset.yaml

+10
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,11 @@ spec:
5959
volumeMounts:
6060
- mountPath: /hostdev
6161
name: dev
62+
{{- if ne $global.Values.drivedb "" }}
63+
- name: config-volume
64+
mountPath: /etc/smart_drivedb.h
65+
subPath: smart_drivedb.h
66+
{{- end }}
6267
dnsPolicy: ClusterFirst
6368
hostNetwork: true
6469
restartPolicy: Always
@@ -67,6 +72,11 @@ spec:
6772
- hostPath:
6873
path: /dev
6974
name: dev
75+
{{- if ne $global.Values.drivedb "" }}
76+
- name: config-volume
77+
configMap:
78+
name: {{ template "prometheus-smartctl-exporter.fullname" $global }}-drivedb
79+
{{- end }}
7080
{{- with $item.nodeSelector }}
7181
nodeSelector:
7282
{{ toYaml . | indent 8 }}

charts/prometheus-smartctl-exporter/values.yaml

+2
Original file line numberDiff line numberDiff line change
@@ -84,3 +84,5 @@ service:
8484
enabled: false
8585
ipFamilies: ["IPv6", "IPv4"]
8686
ipFamilyPolicy: "PreferDualStack"
87+
88+
drivedb: ""

0 commit comments

Comments
 (0)