forked from rancher/charts
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[dev-v2.9] Add ServiceMonitor for scraping fleet-controller in `ranch…
…er-monitoring` chart (rancher#3949)
- Loading branch information
1 parent
a8daf67
commit ec37c6e
Showing
4 changed files
with
54 additions
and
2 deletions.
There are no files selected for viewing
Binary file modified
BIN
-34 Bytes
(100%)
assets/rancher-monitoring/rancher-monitoring-104.0.0-rc1+up45.31.1.tgz
Binary file not shown.
26 changes: 26 additions & 0 deletions
26
...ng/104.0.0-rc1+up45.31.1/templates/rancher-monitoring/exporters/fleet/servicemonitor.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
26 changes: 26 additions & 0 deletions
26
...enerated-changes/overlay/templates/rancher-monitoring/exporters/fleet/servicemonitor.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 }} |