Skip to content

feat(targetallocator): auto-create RBAC for standalone TargetAllocator#5148

Open
frzifus wants to merge 1 commit into
open-telemetry:mainfrom
frzifus:feat/targetallocator-auto-rbac
Open

feat(targetallocator): auto-create RBAC for standalone TargetAllocator#5148
frzifus wants to merge 1 commit into
open-telemetry:mainfrom
frzifus:feat/targetallocator-auto-rbac

Conversation

@frzifus

@frzifus frzifus commented May 26, 2026

Copy link
Copy Markdown
Member

Summary

  • When --create-rbac-permissions is enabled, the operator now generates a ClusterRole and ClusterRoleBinding for standalone TargetAllocator CRs
  • Grants the TA service account the permissions needed for Prometheus CR discovery (namespaces, nodes, servicemonitors, podmonitors, etc.)
  • Previously this RBAC had to be created manually, unlike collector-embedded TargetAllocators

🤖 Generated with Claude Code

@frzifus
frzifus requested a review from a team as a code owner May 26, 2026 18:07
@frzifus
frzifus requested review from iblancasa and jaronoff97 May 26, 2026 18:07
When CreateRBACPermissions is enabled, generate a ClusterRole and
ClusterRoleBinding for standalone TargetAllocator CRs with the
permissions needed for Prometheus CR discovery.

Signed-off-by: Benedikt Bongartz <bongartz@klimlive.de>
@frzifus
frzifus force-pushed the feat/targetallocator-auto-rbac branch from b7a5127 to dca1bfc Compare May 26, 2026 18:40

@pavolloffay pavolloffay left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The PR needs rebasing

- apiGroups:
- rbac.authorization.k8s.io
resources:
- clusterrolebindings

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

shouldn't this be optional? e.g. user should grant these permissions explicitly

},
{
APIGroups: []string{"networking.k8s.io"},
Resources: []string{"ingresses"},

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is this really required by TA?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants