Skip to content

Conversation

@jeremyeder
Copy link
Owner

Resolves #6

This PR implements Phase 2 of the RBAC conversion by updating the operator to reference namespace-scoped Roles instead of ClusterRoles.

Changes

  • Updated ensureRoleBinding() function in components/operator/main.go
  • Changed RoleRef.Kind from 'ClusterRole' to 'Role' at line 990

This change is part of Epic #1 and depends on #5.

Generated with Claude Code

…Roles

Change RoleRef.Kind from 'ClusterRole' to 'Role' in ensureRoleBinding() function
to support namespace-scoped RBAC in single namespace mode.

Resolves #6

Co-authored-by: Jeremy Eder <jeremyeder@users.noreply.github.com>
@jeremyeder jeremyeder merged commit 217fdcd into main Oct 2, 2025
4 of 8 checks passed
Copy link

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

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

💡 Codex Review

https://github.com/jeremyeder/vTeam/blob/483adf6f622113d5e262987a036b6d19aa17179e/components/operator/main.go#L988-L991
P1 Badge Switching RoleBinding to Role leaves no permissions

The new RoleRef.Kind of Role assumes a namespaced Role with the same name already exists, but the repo still only installs cluster-scoped definitions (components/manifests/rbac/ambient-project-*-clusterrole.yaml) and the operator never creates Roles. Kubernetes happily creates a RoleBinding that references a missing Role, so after this change group members receive no privileges even though reconciliation reports success. Either keep binding to the existing ClusterRoles or ensure a matching Role is created in each namespace before this code runs.

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

jeremyeder added a commit that referenced this pull request Oct 17, 2025
Phase 2: Advanced Conversational AI Interface
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.

[Phase 2] Update operator to reference namespace Roles instead of ClusterRoles

2 participants