Skip to content

Commit 9a100ee

Browse files
authored
Merge pull request #91630 from max-cx/OBSDOCS-1738
OBSDOCS-1738: Add a suitable k8sattributesprocessor to ClusterRole example
2 parents 8264910 + 7a9b993 commit 9a100ee

File tree

2 files changed

+15
-7
lines changed

2 files changed

+15
-7
lines changed

modules/otel-forwarding-traces.adoc

Lines changed: 12 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -37,14 +37,19 @@ kind: ClusterRole
3737
metadata:
3838
name: otel-collector
3939
rules:
40-
# <1>
41-
# <2>
42-
- apiGroups: ["", "config.openshift.io"]
43-
resources: ["pods", "namespaces", "infrastructures", "infrastructures/status"]
44-
verbs: ["get", "watch", "list"]
40+
- apiGroups: [""]
41+
resources: ["pods", "namespaces",]
42+
verbs: ["get", "watch", "list"] # <1>
43+
- apiGroups: ["apps"]
44+
resources: ["replicasets"]
45+
verbs: ["get", "watch", "list"] # <2>
46+
- apiGroups: ["config.openshift.io"]
47+
resources: ["infrastructures", "infrastructures/status"]
48+
verbs: ["get", "watch", "list"] # <3>
4549
----
46-
<1> The `k8sattributesprocessor` requires permissions for pods and namespaces resources.
47-
<2> The `resourcedetectionprocessor` requires permissions for infrastructures and status.
50+
<1> This example uses the Kubernetes Attributes Processor, which requires these permissions for the `pods` and `namespaces` resources.
51+
<2> Also due to the Kubernetes Attributes Processor, these permissions are required for the `replicasets` resources.
52+
<3> This example also uses the Resource Detection Processor, which requires these permissions for the `infrastructures` and `status` resources.
4853

4954
. Bind the cluster role to the service account.
5055
+

observability/otel/otel-collector/otel-collector-processors.adoc

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -333,6 +333,9 @@ rules:
333333
- apiGroups: ['']
334334
resources: ['pods', 'namespaces']
335335
verbs: ['get', 'watch', 'list']
336+
- apiGroups: ['apps']
337+
resources: ['replicasets']
338+
verbs: ['get', 'watch', 'list']
336339
# ...
337340
----
338341

0 commit comments

Comments
 (0)