2023-01-27 05:42:08 +00:00
|
|
|
--- charts-original/templates/servicemonitor.yaml
|
|
|
|
+++ charts/templates/servicemonitor.yaml
|
2023-05-12 22:18:04 +00:00
|
|
|
@@ -32,9 +32,19 @@
|
|
|
|
{{- if .Values.prometheus.monitor.honorLabels }}
|
|
|
|
honorLabels: true
|
|
|
|
{{- end }}
|
|
|
|
- {{- if .Values.prometheus.monitor.metricRelabelings }}
|
2023-01-27 05:42:08 +00:00
|
|
|
metricRelabelings:
|
2023-05-12 22:18:04 +00:00
|
|
|
+ {{- if .Values.prometheus.monitor.metricRelabelings }}
|
2023-01-27 05:42:08 +00:00
|
|
|
{{- toYaml .Values.prometheus.monitor.metricRelabelings | nindent 8 }}
|
2023-05-12 22:18:04 +00:00
|
|
|
+ {{- end }}
|
|
|
|
+ {{ if .Values.global.cattle.clusterId }}
|
|
|
|
+ - sourceLabels: [__address__]
|
|
|
|
+ targetLabel: cluster_id
|
|
|
|
+ replacement: {{ .Values.global.cattle.clusterId }}
|
|
|
|
+ {{- end }}
|
|
|
|
+ {{ if .Values.global.cattle.clusterName }}
|
|
|
|
+ - sourceLabels: [__address__]
|
|
|
|
+ targetLabel: cluster_name
|
|
|
|
+ replacement: {{ .Values.global.cattle.clusterName }}
|
|
|
|
{{- end }}
|
|
|
|
{{- if .Values.prometheus.monitor.relabelings }}
|
|
|
|
relabelings:
|
|
|
|
@@ -61,10 +71,6 @@
|
|
|
|
{{- if .Values.prometheus.monitor.honorLabels }}
|
|
|
|
honorLabels: true
|
2023-01-27 05:42:08 +00:00
|
|
|
{{- end }}
|
2023-05-12 22:18:04 +00:00
|
|
|
- {{- if .Values.prometheus.monitor.metricRelabelings }}
|
|
|
|
- metricRelabelings:
|
|
|
|
- {{- toYaml .Values.prometheus.monitor.metricRelabelings | nindent 8 }}
|
|
|
|
- {{- end }}
|
2023-01-27 05:42:08 +00:00
|
|
|
{{- if .Values.prometheus.monitor.relabelings }}
|
|
|
|
relabelings:
|
2023-05-12 22:18:04 +00:00
|
|
|
{{- toYaml .Values.prometheus.monitor.relabelings | nindent 8 }}
|