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
-**Metric**: Monitors specific Kubernetes resources in the local or remote clusters using GroupVersionKind targeting
117
-
-**ManagedMetric**: Specialized for monitoring Crossplane managed resources (resources with "crossplane" and "managed" categories)
118
-
-**FederatedMetric**: Monitors resources across multiple clusters, aggregating data from federated sources
119
-
-**FederatedManagedMetric**: Monitors Crossplane managed resources across multiple clusters
120
-
-**RemoteClusterAccess**: Provides access configuration for monitoring resources in remote clusters
121
-
-**FederatedClusterAccess**: Discovers and provides access to multiple clusters for federated monitoring
147
+
-[**Metric**](config/crd/bases/metrics.cloud.sap_metrics.yaml): Monitors specific Kubernetes resources in the local or remote clusters using GroupVersionKind targeting
148
+
-[**ManagedMetric**](config/crd/bases/metrics.cloud.sap_managedmetrics.yaml): Specialized for monitoring Crossplane managed resources (resources with "crossplane" and "managed" categories)
149
+
-[**FederatedMetric**](config/crd/bases/metrics.cloud.sap_federatedmetrics.yaml): Monitors resources across multiple clusters, aggregating data from federated sources
150
+
-[**FederatedManagedMetric**](config/crd/bases/metrics.cloud.sap_federatedmanagedmetrics.yaml): Monitors Crossplane managed resources across multiple clusters
151
+
-[**RemoteClusterAccess**](config/crd/bases/metrics.cloud.sap_remoteclusteraccesses.yaml): Provides access configuration for monitoring resources in remote clusters
152
+
-[**FederatedClusterAccess**](config/crd/bases/metrics.cloud.sap_federatedclusteraccesses.yaml): Discovers and provides access to multiple clusters for federated monitoring
153
+
-[**DataSink**](config/crd/bases/metrics.cloud.sap_datasinks.yaml): Defines where and how metrics data should be sent, supporting various destinations like Dynatrace
@@ -142,6 +174,30 @@ Replace `<operator-namespace>` and `<version>` with appropriate values.
142
174
143
175
After deployment, create your DataSink configuration as described in the [DataSink Configuration](#datasink-configuration) section.
144
176
177
+
## Getting Started
178
+
You’ll need a Kubernetes cluster to run against. You can use [KIND](https://sigs.k8s.io/kind) to get a local cluster for testing, or run against a remote cluster.
179
+
**Note:** Your controller will automatically use the current context in your kubeconfig file (i.e. whatever cluster `kubectl cluster-info` shows).
180
+
181
+
### Quickstart
182
+
183
+
1. Clone the repository and install prerequisites (Go, Docker, kind, kubectl).
184
+
2. Configure your data sink by copying the configuration in [`examples/datasink/basic-datasink.yaml`](examples/datasink/basic-datasink.yaml) and modifying it to suit your environment.
185
+
- For example, if using Dynatrace, create a Kubernetes Secret with your API token and update the DataSink resource accordingly.
186
+
- The file should be placed and named like this: `examples/datasink/dynatrace-prod-setup.yaml`. (automatically excluded in [.gitignore](.gitignore))
187
+
3. Run `make dev-local-all` to set up a local development environment.
188
+
4. Run `make run` to start the Metrics Operator locally.
189
+
5. Check your data sink for incoming metrics.
190
+
191
+
### Common Development Tasks
192
+
This project uses a Makefile to streamline development tasks. Common targets include:
193
+
194
+
-`make dev-local-all` – Set up a local kind cluster with all CRDs, Crossplane, and sample resources.
195
+
-`make run` – Run the operator locally for development.
196
+
-`make dev-clean` – Delete the local kind cluster.
197
+
-`make test` – Run all Go tests.
198
+
-`make lint` – Run golangci-lint on the codebase.
199
+
-`make manifests generate` – Regenerate CRDs and deepcopy code after API changes.
200
+
145
201
## Usage
146
202
147
203
### Metric
@@ -154,9 +210,9 @@ The projections are then translated to dimensions in the metric.
154
210
apiVersion: metrics.cloud.sap/v1alpha1
155
211
kind: Metric
156
212
metadata:
157
-
name: comp-pod
213
+
name: metric-pod-count
158
214
spec:
159
-
name: comp-metric-pods
215
+
name: metric-pod-count
160
216
description: Pods
161
217
target:
162
218
kind: Pod
@@ -416,7 +472,7 @@ The detailed guide covers:
416
472
417
473
### Migration from Legacy Configuration
418
474
419
-
**Important**: The old method of using hardcoded secret names (such as `co-dynatrace-credentials`) has been deprecated and removed. You must now use DataSink resources to configure your metrics destinations.
475
+
**Important**: The old method of using hardcoded secret names (such as `dynatrace-credentials`) has been deprecated and removed. You must now use DataSink resources to configure your metrics destinations.
420
476
421
477
To migrate:
422
478
1. Create a DataSink resource pointing to your existing authentication secret
@@ -437,37 +493,6 @@ To make the most of your metrics:
437
493
For specific instructions on using your data sink's features, refer to its documentation. For example, if using Dynatrace, consult the Dynatrace documentation for information on creating custom charts, setting up alerts, and performing advanced analytics on your metric data.
438
494
439
495
440
-
## Getting Started
441
-
You’ll need a Kubernetes cluster to run against. You can use [KIND](https://sigs.k8s.io/kind) to get a local cluster for testing, or run against a remote cluster.
442
-
**Note:** Your controller will automatically use the current context in your kubeconfig file (i.e. whatever cluster `kubectl cluster-info` shows).
443
-
444
-
### Running on the cluster
445
-
1. Install Instances of Custom Resources:
446
-
447
-
```sh
448
-
make dev-local-all
449
-
```
450
-
451
-
2. Run the controller:
452
-
453
-
```sh
454
-
make dev-run
455
-
```
456
-
Or run it from your IDE.
457
-
458
-
### Delete Kind Cluster
459
-
Delete Kind cluster
460
-
```sh
461
-
make dev-clean
462
-
```
463
-
464
-
### Modifying the API definitions
465
-
If you are editing the API definitions, generate the manifests such as CRs or CRDs using:
466
-
467
-
```sh
468
-
make manifests generate
469
-
```
470
-
471
496
## Support, Feedback, Contributing
472
497
473
498
This project is open to feature requests/suggestions, bug reports etc. via [GitHub issues](https://github.com/SAP/metrics-operator/issues). Contribution and feedback are encouraged and always welcome. For more information about how to contribute, the project structure, as well as additional contribution information, see our [Contribution Guidelines](CONTRIBUTING.md).
0 commit comments