Skip to content

Commit b0e74dc

Browse files
authored
[prometheus-smartctl-exporter] allow configuration of updateStrategy and prom metricRelabelings (#5556)
1 parent ae24806 commit b0e74dc

File tree

4 files changed

+13
-5
lines changed

4 files changed

+13
-5
lines changed

charts/prometheus-smartctl-exporter/Chart.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ type: application
1515
# This is the chart version. This version number should be incremented each time you make changes
1616
# to the chart and its templates, including the app version.
1717
# Versions are expected to follow Semantic Versioning (https://semver.org/)
18-
version: 0.13.0
18+
version: 0.14.0
1919

2020
# This is the version number of the application being deployed. This version number should be
2121
# incremented each time you make changes to the application. Versions are not expected to

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

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,10 +17,9 @@ metadata:
1717
{{- include "prometheus-smartctl-exporter.labels" $global | nindent 4 }}
1818
idx: i{{ $idx }}
1919
spec:
20-
updateStrategy:
21-
rollingUpdate:
22-
maxUnavailable: 1
23-
type: RollingUpdate
20+
{{- with $global.Values.updateStrategy }}
21+
updateStrategy: {{ toYaml . | nindent 4 }}
22+
{{- end }}
2423
selector:
2524
matchLabels:
2625
{{- include "prometheus-smartctl-exporter.selectorLabels" $global | nindent 6 }}

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

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,9 @@ spec:
2020
scrapeTimeout: {{ .Values.serviceMonitor.scrapeTimeout }}
2121
{{- with .Values.serviceMonitor.relabelings }}
2222
relabelings: {{ toYaml . | nindent 8 }}
23+
{{- end }}
24+
{{- with .Values.serviceMonitor.metricRelabelings }}
25+
metricRelabelings: {{ toYaml . | nindent 8 }}
2326
{{- end }}
2427
namespaceSelector:
2528
matchNames:

charts/prometheus-smartctl-exporter/values.yaml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@ serviceMonitor:
2929
scrapeTimeout: 30s
3030
# Set relabel_configs as per https://prometheus.io/docs/prometheus/latest/configuration/configuration/#relabel_config
3131
relabelings: []
32+
metricRelabelings: []
3233

3334
prometheusRules:
3435
enabled: false
@@ -45,6 +46,11 @@ image:
4546
pullPolicy: IfNotPresent
4647
pullSecrets: []
4748

49+
updateStrategy:
50+
rollingUpdate:
51+
maxUnavailable: 1
52+
type: RollingUpdate
53+
4854
serviceAccount:
4955
# Specifies whether a service account should be created
5056
create: true

0 commit comments

Comments
 (0)