Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[dev-v2.9] Add ServiceMonitor for scraping fleet-controller in rancher-monitoring chart #3949

Merged
merged 3 commits into from
Jun 6, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file not shown.
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 }}
4 changes: 2 additions & 2 deletions index.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15644,7 +15644,7 @@ entries:
catalog.cattle.io/upstream-version: 45.31.1
apiVersion: v2
appVersion: v0.65.1
created: "2024-06-05T09:32:59.399823889+05:30"
created: "2024-06-06T09:47:50.601115201+02:00"
dependencies:
- condition: grafana.enabled
name: grafana
Expand Down Expand Up @@ -15716,7 +15716,7 @@ entries:
and Prometheus rules combined with documentation and scripts to provide easy
to operate end-to-end Kubernetes cluster monitoring with Prometheus using the
Prometheus Operator.
digest: d0b1515cccd1899ef3ecdfa86b6de5f2c7000f6fd47f1d68414e610593ac4cdc
digest: 9b5d15eb638e0158e0ca5474bf68af003cbe01b384c85b26504a80d8d4586762
home: https://github.com/prometheus-operator/kube-prometheus
icon: file://assets/logos/rancher-monitoring.png
keywords:
Expand Down
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 }}