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
Copy file name to clipboardExpand all lines: README.md
+39-19Lines changed: 39 additions & 19 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -54,44 +54,63 @@ This can be useful for tracking additional dimensions of the resource, such as f
54
54
The projections are then translated to dimensions in the metric.
55
55
56
56
```yaml
57
-
apiVersion: metrics.cloud.sap/v1alpha
57
+
apiVersion: metrics.cloud.sap/v1alpha1
58
58
kind: Metric
59
59
metadata:
60
60
name: comp-pod
61
61
spec:
62
62
name: comp-metric-pods
63
63
description: Pods
64
64
target:
65
-
resource: pods
65
+
kind: Pod
66
66
group: ""
67
67
version: v1
68
-
frequency: 1# in minutes
68
+
interval: "1m"
69
69
projections:
70
70
- name: pod-namespace
71
71
fieldPath: "metadata.namespace"
72
72
---
73
73
```
74
74
75
+
### Managed Metric
76
+
77
+
Managed metrics are used to monitor crossplane managed resources. They automatically track resources that have the "crossplane" and "managed" categories in their CRDs.
78
+
79
+
```yaml
80
+
apiVersion: metrics.cloud.sap/v1alpha1
81
+
kind: ManagedMetric
82
+
metadata:
83
+
name: managed-metric
84
+
spec:
85
+
name: managed-metric
86
+
description: Status metric created by an Operator
87
+
kind: Release
88
+
group: helm.crossplane.io
89
+
version: v1beta1
90
+
interval: "1m"
91
+
---
92
+
```
93
+
75
94
### Federated Metric
76
95
Federated metrics deal with resources that are spread across multiple clusters. To monitor these resources, you need to define a `FederatedMetric` resource.
77
96
They offer capabilities to aggregate data as well as filtering down to a specific cluster or field using projections.
78
97
```yaml
79
-
apiVersion: metrics.cloud.sap/v1beta1
98
+
apiVersion: metrics.cloud.sap/v1alpha1
80
99
kind: FederatedMetric
81
100
metadata:
82
101
name: xfed-prov
83
102
spec:
84
103
name: xfed-prov
85
104
description: crossplane providers
86
105
target:
87
-
group: pkg.crossplane.io
88
-
resource: providers
106
+
kind: Provider
107
+
group: pkg.crossplane.io
89
108
version: v1
90
-
frequency: 1# in minutes
109
+
interval: "1m"
91
110
projections:
92
111
- name: package
93
112
fieldPath: "spec.package"
94
-
federateCaRef:
113
+
federateClusterAccessRef:
95
114
name: federate-ca-sample
96
115
namespace: default
97
116
---
@@ -104,15 +123,15 @@ The pre-condition here is that if a resource comes from a crossplane provider, i
104
123
105
124
106
125
```yaml
107
-
apiVersion: metrics.cloud.sap/v1beta1
126
+
apiVersion: metrics.cloud.sap/v1alpha1
108
127
kind: FederatedManagedMetric
109
128
metadata:
110
129
name: xfed-managed
111
130
spec:
112
131
name: xfed-managed
113
132
description: crossplane managed resources
114
-
frequency: 1# in minutes
115
-
federateCaRef:
133
+
interval: "1m"
134
+
federateClusterAccessRef:
116
135
name: federate-ca-sample
117
136
namespace: default
118
137
---
@@ -121,14 +140,15 @@ spec:
121
140
## Remote Cluster Access
122
141
123
142
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:
143
+
### Remote Cluster Access
144
+
145
+
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
146
127
-
This cluster access resource can be used by `CompoundMetric` resources to monitor resources in the remote cluster.
147
+
This remote cluster access resource can be used by `Metric` and `ManagedMetric` resources to monitor resources in the remote cluster.
128
148
129
149
```yaml
130
-
apiVersion: metrics.cloud.sap/v1beta1
131
-
kind: ClusterAccess
150
+
apiVersion: metrics.cloud.sap/v1alpha1
151
+
kind: RemoteClusterAccess
132
152
metadata:
133
153
name: remote-cluster
134
154
namespace: <monitoring-namespace>
@@ -147,17 +167,17 @@ spec:
147
167
To monitor resources across multiple clusters, define a `FederatedClusterAccess` resource:
148
168
149
169
```yaml
150
-
apiVersion: metrics.cloud.sap/v1beta1
170
+
apiVersion: metrics.cloud.sap/v1alpha1
151
171
kind: FederatedClusterAccess
152
172
metadata:
153
173
name: federate-ca-sample
154
174
namespace: default
155
175
spec:
156
176
target:
177
+
kind: ControlPlane
157
178
group: core.orchestrate.cloud.sap
158
-
resource: controlplanes #plural always, lowecase only
0 commit comments