-
Bug
-
Resolution: Done
-
Undefined
-
None
-
None
-
None
-
1
-
False
-
None
-
False
-
-
-
Tracing Sprint # 267 - Release
The following is shown as `Example ClusterRole` in `2. Create a cluster role for the service account` in doc[1]
apiVersion: rbac.authorization.k8s.io/v1 kind: ClusterRole metadata: name: otel-collector rules: (1) (2) - apiGroups: ["", "config.openshift.io"] resources: ["pods", "namespaces", "infrastructures", "infrastructures/status"] verbs: ["get", "watch", "list"] (1) The k8sattributesprocessor requires permissions for pods and namespaces resources. (2) The resourcedetectionprocessor requires permissions for infrastructures and status.
When we run `3. Bind the cluster role to the service account` and `4. Create the YAML file to define the OpenTelemetryCollector custom resource (CR)`, and we get the following error.
W1212 XX:XX:XX.XXXXXXX 1 reflector.go:561] k8s.io/client-go@v0.31.2/tools/cache/reflector.go:243: failed to list *v1.ReplicaSet: replicasets.apps is forbidden: User "system:serviceaccount:tel:otel-collector-deployment" cannot list resource "replicasets" in API group "apps" at the cluster scope E1212 XX:XX:XX.XXXXXX 1 reflector.go:158] "Unhandled Error" err="k8s.io/client-go@v0.31.2/tools/cache/reflector.go:243: Failed to watch *v1.ReplicaSet: failed to list *v1.ReplicaSet: replicasets.apps is forbidden: User \"system:serviceaccount:tel:otel-collector-deployment\" cannot list resource \"replicasets\" in API group \"apps\" at the cluster scope" logger="UnhandledError"
Does this mean that at least the following are necessary as specific example of (1)?
- apiGroups: ["apps"] resources: ["replicasets"] verbs: ["get", "list", "watch"]
I think [2] and [3] are related fixes on this issue.
[2] https://github.com/open-telemetry/opentelemetry-operator/issues/2823
[3] https://github.com/open-telemetry/opentelemetry-collector-contrib/pull/23013
- is documented by
-
OBSDOCS-1738 [urgent][TRACING-5064] Add a suitable k8sattributesprocessor to ClusterRole example
-
- Review
-
-
OBSDOCS-1648 [TRACING-5064] Add a suitable k8sattributesprocessor into "Example ClusterRole" in the doc
-
- Closed
-
- links to