-
Notifications
You must be signed in to change notification settings - Fork 163
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
ServiceAccount can be assigned as tenant owner, but cannot be used as not in capsuleUserGroups #449
Comments
@slushysnowman thanks for reporting this. Actually, you have to add the service account to capsule group
|
@bsctl Yeah that's what I explored initially (especially as we aren't using the default capsule group as user group). I'm guessing it's just due to my lack of knowledge, but I couldn't find a way to modify the service account groups at all. |
Just to verify we are saying the same thing, when capsuleUserGroups is set to a group (id) to limit the users or just to use something organization specific instead of capsule.clastix.io then user access works fine. If a SA is created running and then run with the But when the @bsctl Is this how you see it as well or? |
@arminc @slushysnowman you are both right, if you want a service account to be owner of the tenant, it should be added to We are using this feature the following way - we have a centralized argocd instance, installed in our management cluster. This argocd instance can provision applications in all our clusters. So its service account and rolebindings are created in all our clusters in argocd-system namespace. By default, when we provision a new tenant we add this account as an additional owner
And our
Because by default, each service account is a member of following groups:
|
I guess we should document better how to let Capsule handling the provisioner procedure for Service Account: can you take this, @bsctl? |
Bug description
Using helm chart, v0.1.2
When assigning a ServiceAccount as tenant owner as described in the use cases, using the service account to create namespaces fails:
Error from server (Forbidden): namespaces is forbidden: User "system:serviceaccount:default:foo" cannot create resource "namespaces" in API group "" at the cluster scope
This seems to be because the service account is not in the groups defined in capsuleUserGroups.
To get this to work,
system:serviceaccounts
needs to be added to capsuleUserGroups, but as far as I can see this is not documented anywhere.How to reproduce
Steps to reproduce the behavior:
Answer should be No
Expected behavior
I'd expect either:
system:serviceaccounts
to be added to capsuleUserGroups by default / in addition to any defined groupssystem:serviceaccounts
group needs to be added to capsuleUserGroups for Service Accounts to be able to act as tenant ownersAdditional context
The text was updated successfully, but these errors were encountered: