-
Notifications
You must be signed in to change notification settings - Fork 1.1k
feat: add helm var to support RBAC for deploying workspaces in extra namespaces #19517
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
Conversation
… to support deploying workspaces in separate namespace to where Coder is deployed
df3b609 to
28158a9
Compare
deansheather
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good, would like to see a new test which flexes all of the new functionality for this though
deansheather
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Code looks good, and the generated RBAC looks correct as well
This is a feature to create Role & RoleBinding entries on a per namespace basis to support deploying workspaces in separate namespace to where Coder is deployed. The idea behind this is to avoid the creation of custom RBAC entries or the use of ClusterRoles (in order to maintain priciple of least privilege).
This is a blink assisted PR.
Example
helm templatewithoutcoder.serviceAccount.workspaceNamespacesenabled (existing behaviour as of current release) is below. Outcome = 1 x SA, 1 x Role, 1 x RoleBinding, all in the coder (.Release.Namespace) namespace.Example
helm templatewithcoder.serviceAccount.workspaceNamespacesenabled is below. Outcome = 1 x SA, 1 x Role, 1 x RoleBinding, all in the coder (.Release.Namespace) namespace PLUS a Role and RoleBinding in thedev-wsnamespace with each of the RoleBindings referencing the coder SA in the coder (.Release.Namespace) namespace: