You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@@ -7,6 +7,7 @@ The Metrics Operator is a powerful tool designed to monitor and provide insights
7
7
## Table of Contents
8
8
9
9
-[Key Features](#key-features)
10
+
-[Architecture Overview](#architecture-overview)
10
11
-[Installation](#installation)
11
12
-[Usage](#usage)
12
13
-[RBAC Configuration](#rbac-configuration)
@@ -23,6 +24,101 @@ The Metrics Operator is a powerful tool designed to monitor and provide insights
23
24
-**Strategic Decision Support**: Offers data-backed insights to guide product evolution.
24
25
-**Customizable Alerting System**: Allows defining alerts based on specific metric thresholds, enabling proactive response to potential issues or significant changes in system state.
25
26
27
+
## Architecture Overview
28
+
29
+
The Metrics Operator provides four main resource types for monitoring Kubernetes objects. Each type serves different use cases:
30
+
31
+
### Metric Resource Flow
32
+
33
+
```mermaid
34
+
graph LR
35
+
M[Metric] -->|targets via GroupVersionKind| K8S[Kubernetes Objects<br/>Pods, Services, etc.]
36
+
M -.->|optional| RCA[RemoteClusterAccess]
37
+
RCA -->|accesses remote cluster| K8S
38
+
M -->|sends data to| DS[Data Sink<br/>Dynatrace, etc.]
-**Metric**: Monitors specific Kubernetes resources in the local or remote clusters using GroupVersionKind targeting
116
+
-**ManagedMetric**: Specialized for monitoring Crossplane managed resources (resources with "crossplane" and "managed" categories)
117
+
-**FederatedMetric**: Monitors resources across multiple clusters, aggregating data from federated sources
118
+
-**FederatedManagedMetric**: Monitors Crossplane managed resources across multiple clusters
119
+
-**RemoteClusterAccess**: Provides access configuration for monitoring resources in remote clusters
120
+
-**FederatedClusterAccess**: Discovers and provides access to multiple clusters for federated monitoring
121
+
26
122
## Installation
27
123
28
124
### Prerequisites
@@ -54,44 +150,63 @@ This can be useful for tracking additional dimensions of the resource, such as f
54
150
The projections are then translated to dimensions in the metric.
55
151
56
152
```yaml
57
-
apiVersion: metrics.cloud.sap/v1alpha
153
+
apiVersion: metrics.cloud.sap/v1alpha1
58
154
kind: Metric
59
155
metadata:
60
156
name: comp-pod
61
157
spec:
62
158
name: comp-metric-pods
63
159
description: Pods
64
160
target:
65
-
resource: pods
161
+
kind: Pod
66
162
group: ""
67
163
version: v1
68
-
frequency: 1# in minutes
164
+
interval: "1m"
69
165
projections:
70
166
- name: pod-namespace
71
167
fieldPath: "metadata.namespace"
72
168
---
73
169
```
74
170
171
+
### Managed Metric
172
+
173
+
Managed metrics are used to monitor crossplane managed resources. They automatically track resources that have the "crossplane" and "managed" categories in their CRDs.
174
+
175
+
```yaml
176
+
apiVersion: metrics.cloud.sap/v1alpha1
177
+
kind: ManagedMetric
178
+
metadata:
179
+
name: managed-metric
180
+
spec:
181
+
name: managed-metric
182
+
description: Status metric created by an Operator
183
+
kind: Release
184
+
group: helm.crossplane.io
185
+
version: v1beta1
186
+
interval: "1m"
187
+
---
188
+
```
189
+
75
190
### Federated Metric
76
191
Federated metrics deal with resources that are spread across multiple clusters. To monitor these resources, you need to define a `FederatedMetric` resource.
77
192
They offer capabilities to aggregate data as well as filtering down to a specific cluster or field using projections.
78
193
```yaml
79
-
apiVersion: metrics.cloud.sap/v1beta1
194
+
apiVersion: metrics.cloud.sap/v1alpha1
80
195
kind: FederatedMetric
81
196
metadata:
82
197
name: xfed-prov
83
198
spec:
84
199
name: xfed-prov
85
200
description: crossplane providers
86
201
target:
87
-
group: pkg.crossplane.io
88
-
resource: providers
202
+
kind: Provider
203
+
group: pkg.crossplane.io
89
204
version: v1
90
-
frequency: 1# in minutes
205
+
interval: "1m"
91
206
projections:
92
207
- name: package
93
208
fieldPath: "spec.package"
94
-
federateCaRef:
209
+
federateClusterAccessRef:
95
210
name: federate-ca-sample
96
211
namespace: default
97
212
---
@@ -104,15 +219,15 @@ The pre-condition here is that if a resource comes from a crossplane provider, i
104
219
105
220
106
221
```yaml
107
-
apiVersion: metrics.cloud.sap/v1beta1
222
+
apiVersion: metrics.cloud.sap/v1alpha1
108
223
kind: FederatedManagedMetric
109
224
metadata:
110
225
name: xfed-managed
111
226
spec:
112
227
name: xfed-managed
113
228
description: crossplane managed resources
114
-
frequency: 1# in minutes
115
-
federateCaRef:
229
+
interval: "1m"
230
+
federateClusterAccessRef:
116
231
name: federate-ca-sample
117
232
namespace: default
118
233
---
@@ -121,14 +236,15 @@ spec:
121
236
## Remote Cluster Access
122
237
123
238
124
-
### Cluster Access
125
-
The Metrics Operator can monitor both the cluster it's deployed in and remote clusters. To monitor a remote cluster, define a `ClusterAccess` resource:
239
+
### Remote Cluster Access
240
+
241
+
The Metrics Operator can monitor both the cluster it's deployed in and remote clusters. To monitor a remote cluster, define a `RemoteClusterAccess` resource:
126
242
127
-
This cluster access resource can be used by `CompoundMetric` resources to monitor resources in the remote cluster.
243
+
This remote cluster access resource can be used by `Metric` and `ManagedMetric` resources to monitor resources in the remote cluster.
128
244
129
245
```yaml
130
-
apiVersion: metrics.cloud.sap/v1beta1
131
-
kind: ClusterAccess
246
+
apiVersion: metrics.cloud.sap/v1alpha1
247
+
kind: RemoteClusterAccess
132
248
metadata:
133
249
name: remote-cluster
134
250
namespace: <monitoring-namespace>
@@ -147,17 +263,17 @@ spec:
147
263
To monitor resources across multiple clusters, define a `FederatedClusterAccess` resource:
148
264
149
265
```yaml
150
-
apiVersion: metrics.cloud.sap/v1beta1
266
+
apiVersion: metrics.cloud.sap/v1alpha1
151
267
kind: FederatedClusterAccess
152
268
metadata:
153
269
name: federate-ca-sample
154
270
namespace: default
155
271
spec:
156
272
target:
273
+
kind: ControlPlane
157
274
group: core.orchestrate.cloud.sap
158
-
resource: controlplanes #plural always, lowecase only
0 commit comments