Skip to content

Commit

Permalink
[prometheus-json-exporter] Add default action to ServiceMonitor (#4591)
Browse files Browse the repository at this point in the history
Signed-off-by: yahel2410 <[email protected]>
Co-authored-by: MH <[email protected]>
  • Loading branch information
yahel2410 and zanhsieh authored Jun 8, 2024
1 parent 782a331 commit 31342d2
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
2 changes: 1 addition & 1 deletion charts/prometheus-json-exporter/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,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
Expand Down
3 changes: 3 additions & 0 deletions charts/prometheus-json-exporter/templates/servicemonitor.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -31,12 +31,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 }}
replacement: {{ $replacement }}
action: replace
{{- end }}
jobLabel: "{{ $.Release.Name }}"
selector:
Expand Down

0 comments on commit 31342d2

Please sign in to comment.