rancher-charts/packages/rancher-monitoring/rancher-kube-state-metrics/generated-changes/patch/templates/servicemonitor.yaml.patch

35 lines
1.3 KiB
Diff
Raw Normal View History

--- charts-original/templates/servicemonitor.yaml
+++ charts/templates/servicemonitor.yaml
@@ -32,9 +32,19 @@
{{- if .Values.prometheus.monitor.honorLabels }}
honorLabels: true
{{- end }}
- {{- if .Values.prometheus.monitor.metricRelabelings }}
metricRelabelings:
+ {{- if .Values.prometheus.monitor.metricRelabelings }}
{{- toYaml .Values.prometheus.monitor.metricRelabelings | nindent 8 }}
+ {{- 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
{{- end }}
- {{- if .Values.prometheus.monitor.metricRelabelings }}
- metricRelabelings:
- {{- toYaml .Values.prometheus.monitor.metricRelabelings | nindent 8 }}
- {{- end }}
{{- if .Values.prometheus.monitor.relabelings }}
relabelings:
{{- toYaml .Values.prometheus.monitor.relabelings | nindent 8 }}