helm: replace instance label by release name instead of pod address

Signed-off-by: Dmytro Bondar <git@bonddim.com>
This commit is contained in:
Dmytro Bondar 2024-11-29 10:11:42 +01:00
parent ba9b6c39e0
commit 29e1cc7848
No known key found for this signature in database
GPG Key ID: C123CD37BBED8BB7

View File

@ -23,8 +23,13 @@ spec:
{{- with .metricRelabelings }} {{- with .metricRelabelings }}
metricRelabelings: {{- toYaml . | nindent 8 }} metricRelabelings: {{- toYaml . | nindent 8 }}
{{- end }} {{- end }}
relabelings:
- action: replace
sourceLabels:
- __meta_kubernetes_pod_label_app_kubernetes_io_name
targetLabel: instance
{{- with .relabelings }} {{- with .relabelings }}
relabelings: {{- toYaml . | nindent 8 }} {{- toYamlPretty . | nindent 8 }}
{{- end }} {{- end }}
{{- with .scrapeTimeout }} {{- with .scrapeTimeout }}
scrapeTimeout: {{ . }} scrapeTimeout: {{ . }}