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
Remember to update this RBAC configuration whenever you add new resource types to monitor.
321
324
322
325
326
+
## DataSink Configuration
327
+
328
+
The Metrics Operator uses DataSink custom resources to define where and how metrics data should be sent. This provides a flexible and secure way to configure data destinations.
329
+
330
+
### Creating a DataSink
331
+
332
+
Define a DataSink resource to specify the connection details and authentication for your metrics destination:
- **apiKey**: API key authentication configuration
363
+
- **secretKeyRef**: Reference to a Kubernetes Secret containing the API key
364
+
- **name**: Name of the Secret
365
+
- **key**: Key within the Secret containing the API token
366
+
367
+
### Using DataSink in Metrics
368
+
369
+
All metric types support the `dataSinkRef` field to specify which DataSink to use:
370
+
371
+
```yaml
372
+
apiVersion: metrics.cloud.sap/v1alpha1
373
+
kind: Metric
374
+
metadata:
375
+
name: pod-count
376
+
spec:
377
+
name: "pods.count"
378
+
target:
379
+
kind: Pod
380
+
group: ""
381
+
version: v1
382
+
dataSinkRef:
383
+
name: default # References the DataSink named "default"
384
+
```
385
+
386
+
### Default Behavior
387
+
388
+
If no `dataSinkRef` is specified in a metric resource, the operator will automatically use a DataSink named "default" in the operator's namespace. This provides backward compatibility and simplifies configuration for single data sink deployments.
389
+
390
+
### Supported Metric Types
391
+
392
+
The `dataSinkRef` field is available in all metric resource types:
393
+
394
+
- [`Metric`](#metric): Basic metrics for Kubernetes resources
395
+
- [`ManagedMetric`](#managed-metric): Metrics for Crossplane managed resources
396
+
- [`FederatedMetric`](#federated-metric): Metrics across multiple clusters
397
+
- [`FederatedManagedMetric`](#federated-managed-metric): Managed resource metrics across multiple clusters
398
+
399
+
### Examples and Detailed Documentation
400
+
401
+
For complete examples and more detailed configuration options:
402
+
403
+
- See the [`examples/datasink/`](examples/datasink/) directory for practical examples
404
+
- Read the comprehensive [DataSink Configuration Guide](docs/datasink-configuration.md) for detailed documentation
405
+
406
+
The examples directory contains:
407
+
- Basic DataSink configuration examples
408
+
- Examples showing DataSink usage with different metric types
409
+
- Migration guidance from legacy configurations
410
+
411
+
The detailed guide covers:
412
+
- Complete specification reference
413
+
- Multiple DataSink scenarios
414
+
- Advanced configuration options
415
+
- Troubleshooting and best practices
416
+
417
+
### Migration from Legacy Configuration
418
+
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.
420
+
421
+
To migrate:
422
+
1. Create a DataSink resource pointing to your existing authentication secret
423
+
2. Update your metric resources to reference the DataSink using `dataSinkRef`
424
+
3. Remove any hardcoded secret references from your configuration
425
+
323
426
## Data Sink Integration
324
427
325
-
The Metrics Operator sends collected data to a configured data sink for storage and analysis. The data sink (e.g., Dynatrace) provides tools for data aggregation, filtering, and visualization.
428
+
The Metrics Operator sends collected data to configured data sinks for storage and analysis. Data sinks (e.g., Dynatrace) provide tools for data aggregation, filtering, and visualization.
326
429
327
430
To make the most of your metrics:
328
431
329
-
1. Configure your data sink according to its documentation.
432
+
1. Configure your DataSink resources according to your data sink's documentation.
330
433
2. Use the data sink's query language or UI to create custom views of your metrics.
331
434
3. Set up alerts based on metric thresholds or patterns.
332
435
4. Leverage the data sink's analysis tools to gain insights into your system's behavior and performance.
0 commit comments