Skip to content

Commit

Permalink
[prometheus-blackbox-exporter] add action=replace to metricsRelabelin…
Browse files Browse the repository at this point in the history
…gs (#3857)

This (default) parameter is automatically added by k8s, causing the in-cluster
object to differ from the manifest created by this chart. This discrepancy
causes GitOps tooling to consider the resource out of date, as described in
#3626

Signed-off-by: Alex Miller <[email protected]>
Signed-off-by: André Bauer <[email protected]>
Co-authored-by: André Bauer <[email protected]>
  • Loading branch information
thinkmassive and monotek authored Nov 17, 2023
1 parent a9cae41 commit cfe3d28
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
2 changes: 1 addition & 1 deletion charts/prometheus-blackbox-exporter/Chart.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
apiVersion: v2
description: Prometheus Blackbox Exporter
name: prometheus-blackbox-exporter
version: 8.6.0
version: 8.6.1
appVersion: v0.24.0
home: https://github.com/prometheus/blackbox_exporter
sources:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,12 +37,15 @@ spec:
- sourceLabels: [instance]
targetLabel: instance
replacement: {{ .url }}
action: replace
- sourceLabels: [target]
targetLabel: target
replacement: {{ .name }}
action: replace
{{- range $targetLabel, $replacement := .additionalMetricsRelabels | default $.Values.serviceMonitor.defaults.additionalMetricsRelabels }}
- targetLabel: {{ $targetLabel | quote }}
replacement: {{ $replacement | quote }}
action: replace
{{- end }}
{{- if concat (.additionalRelabeling | default list) $.Values.serviceMonitor.defaults.additionalRelabeling }}
relabelings:
Expand Down

0 comments on commit cfe3d28

Please sign in to comment.