diff --git a/modules/otel-config-target-allocator.adoc b/modules/otel-config-target-allocator.adoc index 4b7799038b8c..66fc1bef01ad 100644 --- a/modules/otel-config-target-allocator.adoc +++ b/modules/otel-config-target-allocator.adoc @@ -4,14 +4,14 @@ :_mod-docs-content-type: REFERENCE [id="otel-collector-ta-{context}"] -= OpenTelemetry Target Allocator += Target allocator -OpenTelemetry Target Allocator (TA) is an optional component which shards scrape targets across -deployed fleet of collectors and integrates with Prometheus `PodMonitor` and `ServiceMonitor` custom resources. -When the TA is enabled the OpenTelemetry Operator adds `http_sd_config` to the enabled `prometheus` receiver which -connects to the TA service. +The target allocator is an optional component of the OpenTelemetry Operator that shards scrape targets across the +deployed fleet of collectors and integrates with the Prometheus `PodMonitor` and `ServiceMonitor` custom resources. +When the target allocator is enabled, the OpenTelemetry Operator adds `http_sd_config` to the enabled `prometheus` receiver that +connects to the target allocator service. -.Example of the OpenTelemetry Collector custom resource with enabled Target allocator +.Example OpenTelemetryCollector CR with the enabled target allocator [source,yaml] ---- apiVersion: opentelemetry.io/v1alpha1 @@ -20,20 +20,20 @@ metadata: name: otel namespace: observability spec: - mode: statefulset <1> + mode: statefulset # <1> targetAllocator: - enabled: true <2> - serviceAccount: <3> + enabled: true # <2> + serviceAccount: # <3> prometheusCR: - enabled: true <4> + enabled: true # <4> scrapeInterval: 10s - serviceMonitorSelector: <5> + serviceMonitorSelector: # <5> name: app1 - podMonitorSelector: <6> + podMonitorSelector: # <6> name: app2 config: | receivers: - prometheus: <7> + prometheus: # <7> config: scrape_configs: [] processors: @@ -46,17 +46,17 @@ spec: processors: [] exporters: [debug] ---- -<1> The deployment mode has to be set to `statefulset` when TA is enabled. -<2> Enable TA. Defaults to `false`. -<3> Service account name of the TA deployment. The service account needs to have RBAC to get `ServiceMonitor`, `PodMonitor` custom resources and other objects from the cluster to properly set labels on scraped metrics. The default service name is `-targetallocator`. -<4> Enable integration with Prometheus `PodMonitor` and `ServiceMonitor` custom resources. -<5> Label selector for Prometheus `ServiceMonitor` custom resources. When empty all service monitors are enabled. -<6> Label selector for Prometheus `PodMonitor` custom resources. When empty all pod monitors are enabled. -<7> Prometheus receiver with at least empty `scrape_config: []` configuration option. +<1> When the target allocator is enabled, the deployment mode must be set to `statefulset`. +<2> Enables the target allocator. Defaults to `false`. +<3> The service account name of the target allocator deployment. The service account needs to have RBAC to get the `ServiceMonitor`, `PodMonitor` custom resources, and other objects from the cluster to properly set labels on scraped metrics. The default service name is `-targetallocator`. +<4> Enables integration with the Prometheus `PodMonitor` and `ServiceMonitor` custom resources. +<5> Label selector for the Prometheus `ServiceMonitor` custom resources. When left empty, enables all service monitors. +<6> Label selector for the Prometheus `PodMonitor` custom resources. When left empty, enables all pod monitors. +<7> Prometheus receiver with the minimal, empty `scrape_config: []` configuration option. -The Target Allocator deployment uses Kubernetes API to get relevant objects from the cluster, therefore it needs a custom RBAC configuration. +The target allocator deployment uses the Kubernetes API to get relevant objects from the cluster, so it requires a custom RBAC configuration. -.RBAC configuration for the Target Allocator service account. +.RBAC configuration for the target allocator service account [source,yaml] ---- apiVersion: rbac.authorization.k8s.io/v1 @@ -89,8 +89,8 @@ roleRef: name: otel-targetallocator subjects: - kind: ServiceAccount - name: otel-targetallocator <1> - namespace: observability <2> + name: otel-targetallocator # <1> + namespace: observability # <2> ---- -<1> Name of the TA service mane. -<2> The namespace of the TA service account. +<1> The name of the target allocator service account mane. +<2> The namespace of the target allocator service account.