Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

k8sattributesprocessor RBAC documentation is not correct about replicasets #32247

Closed
iblancasa opened this issue Apr 9, 2024 · 1 comment · Fixed by #32248
Closed

k8sattributesprocessor RBAC documentation is not correct about replicasets #32247

iblancasa opened this issue Apr 9, 2024 · 1 comment · Fixed by #32248
Labels
bug Something isn't working documentation Improvements or additions to documentation processor/k8sattributes k8s Attributes processor

Comments

@iblancasa
Copy link
Contributor

Component(s)

processor/k8sattributes

What happened?

Description

The documentation claims replicasets permissions are only needed when using when using k8s.deployment.uid or k8s.deployment.name:

If you'd like to set up the k8sattributesprocessor to receive telemetry from across namespaces, it will need get, watch and list permissions on both pods and namespaces resources, for all namespaces and pods included in the configured filters. Additionally, when using k8s.deployment.uid or k8s.deployment.name the processor also needs get, watch and list permissions for replicasets resources.

But that is not correct because when providing this configuration:

    processors:
      k8sattributes: {}

This error appears in the OpenTelemetry Collector logs:

E0407 06:56:47.446856       1 reflector.go:147] k8s.io/[email protected]/tools/cache/reflector.go:229: Failed to watch *v1.ReplicaSet: failed to list *v1.ReplicaSet: replicasets.apps is forbidden: User "system:serviceaccount:opentelemetry:otel-collector" cannot list resource "replicasets" in API group "apps" at the cluster scope

Collector version

0.97.0

Environment information

Environment

OS: (e.g., "Ubuntu 20.04")
Compiler(if manually compiled): (e.g., "go 14.2")

OpenTelemetry Collector configuration

No response

Log output

No response

Additional context

No response

@iblancasa iblancasa added bug Something isn't working needs triage New item requiring triage labels Apr 9, 2024
@github-actions github-actions bot added the processor/k8sattributes k8s Attributes processor label Apr 9, 2024
Copy link
Contributor

github-actions bot commented Apr 9, 2024

Pinging code owners:

See Adding Labels via Comments if you do not have permissions to add labels yourself.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working documentation Improvements or additions to documentation processor/k8sattributes k8s Attributes processor
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants