Skip to content

Commit

Permalink
[prometheus-redis-exporter] explicit default for metricRelabelings[].…
Browse files Browse the repository at this point in the history
…action (#3224)

* explicit default for metricRelabelings[].action

explicit default for metricRelabelings[].action
 if not set it causes permanent difference when using ArgoCd

Signed-off-by: shcherbak <ju.shcherbak@gmail.com>

* bump chart version

Signed-off-by: shcherbak <ju.shcherbak@gmail.com>

---------

Signed-off-by: shcherbak <ju.shcherbak@gmail.com>
Co-authored-by: MH <zanhsieh@gmail.com>
  • Loading branch information
shcherbak and zanhsieh committed Apr 13, 2023
1 parent 6a67d96 commit 0468a4b
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
2 changes: 1 addition & 1 deletion charts/prometheus-redis-exporter/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ apiVersion: v2
appVersion: v1.44.0
description: Prometheus exporter for Redis metrics
name: prometheus-redis-exporter
version: 5.3.1
version: 5.3.2
home: https://github.com/oliver006/redis_exporter
sources:
- https://github.com/oliver006/redis_exporter
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,14 +36,17 @@ spec:
{{ toYaml $.Values.serviceMonitor.relabelings | indent 4 }}
{{- end }}
metricRelabelings:
- sourceLabels: [instance]
- action: replace
sourceLabels: [instance]
targetLabel: instance
replacement: {{ .url }}
- sourceLabels: [target]
- action: replace
sourceLabels: [target]
targetLabel: target
replacement: {{ .name }}
{{- range $targetLabel, $replacement := .additionalMetricsRelabels | default $.Values.serviceMonitor.additionalMetricsRelabels }}
- targetLabel: {{ $targetLabel | quote }}
- action: replace
targetLabel: {{ $targetLabel | quote }}
replacement: {{ $replacement | quote }}
{{- end }}
{{- if concat (.additionalRelabeling | default list) $.Values.serviceMonitor.additionalRelabeling }}
Expand Down

0 comments on commit 0468a4b

Please sign in to comment.