1
0
mirror of https://github.com/openshift/openshift-docs.git synced 2026-02-05 21:46:22 +01:00

TRACING-5064 | RHOSDT (any version), fix RBAC for k8sattribute processor

Signed-off-by: Pavol Loffay <p.loffay@gmail.com>
This commit is contained in:
Pavol Loffay
2025-02-28 16:02:47 +01:00
committed by openshift-cherrypick-robot
parent 27b1d584f7
commit dcffbef268
2 changed files with 15 additions and 7 deletions

View File

@@ -37,14 +37,19 @@ kind: ClusterRole
metadata:
name: otel-collector
rules:
# <1>
# <2>
- apiGroups: ["", "config.openshift.io"]
resources: ["pods", "namespaces", "infrastructures", "infrastructures/status"]
verbs: ["get", "watch", "list"]
- apiGroups: [""]
resources: ["pods", "namespaces",]
verbs: ["get", "watch", "list"] # <1>
- apiGroups: ["apps"]
resources: ["replicasets"]
verbs: ["get", "watch", "list"] # <2>
- apiGroups: ["config.openshift.io"]
resources: ["infrastructures", "infrastructures/status"]
verbs: ["get", "watch", "list"] # <3>
----
<1> The `k8sattributesprocessor` requires permissions for pods and namespaces resources.
<2> The `resourcedetectionprocessor` requires permissions for infrastructures and status.
<1> This example uses the Kubernetes Attributes Processor, which requires these permissions for the `pods` and `namespaces` resources.
<2> Also due to the Kubernetes Attributes Processor, these permissions are required for the `replicasets` resources.
<3> This example also uses the Resource Detection Processor, which requires these permissions for the `infrastructures` and `status` resources.
. Bind the cluster role to the service account.
+

View File

@@ -333,6 +333,9 @@ rules:
- apiGroups: ['']
resources: ['pods', 'namespaces']
verbs: ['get', 'watch', 'list']
- apiGroups: ['apps']
resources: ['replicasets']
verbs: ['get', 'watch', 'list']
# ...
----