diff --git a/packages/rancher-monitoring/rancher-monitoring/generated-changes/overlay/templates/rancher-monitoring/exporters/fleet/servicemonitor.yaml b/packages/rancher-monitoring/rancher-monitoring/generated-changes/overlay/templates/rancher-monitoring/exporters/fleet/servicemonitor.yaml new file mode 100644 index 0000000000..1d51882d03 --- /dev/null +++ b/packages/rancher-monitoring/rancher-monitoring/generated-changes/overlay/templates/rancher-monitoring/exporters/fleet/servicemonitor.yaml @@ -0,0 +1,26 @@ +{{- if .Values.rancherMonitoring.enabled }} +apiVersion: monitoring.coreos.com/v1 +kind: ServiceMonitor +metadata: + labels: {{ include "kube-prometheus-stack.labels" . | nindent 4 }} + name: monitoring-fleet-controller + namespace: cattle-fleet-system +spec: + endpoints: + - port: metrics + metricRelabelings: + {{ 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 }} + jobLabel: fleet + selector: + matchLabels: + app: fleet-controller +{{- end }}