-
Notifications
You must be signed in to change notification settings - Fork 65
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
basehub: add singleuserAdmin.serviceAccountName config and small refactoring #3039
basehub: add singleuserAdmin.serviceAccountName config and small refactoring #3039
Conversation
This comment was marked as resolved.
This comment was marked as resolved.
There was a similar request from another community a few weeks ago #2886 that this PR might help solve |
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.
@consideRatio, I don't think I understand how this PR as it is right now, could allow admins to map to a different SA. I think this is because it is not clear for me which is the role that KubeSpawner.service_account
plays, given our current setup for bucket access.
It is my understanding that right now all user pods map to a K8s SA that in turn, maps to a cloud specific service account. Can you please help me understand what happens if we set through KubeSpawner.service_account another sa for admins? How does this override the infrastructure setup? Where does this new admin sa gets created? do we do it manually?
Thanks and sorry for the confusion.
Thank you for reviewing @GeorgianaElena!! I should have written up more about this beforehand =/ An overview as I understand it currently:
So I think there are reletad work and things to consider:
This PR is meant as an incremental step to offload us from getting everything done at the same time. |
There was no schema entry allowing for this, so I removed it as it wasn't functional or used anyhow atm.
1425e8d
to
1d60dba
Compare
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.
@GeorgianaElena I updated the title, could you re-review this?
if not (self.user.admin and custom_admin): | ||
return super().start(*args, **kwargs) |
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.
This is opinionated refactoring to have us avoid nesting into if statements and make the code a bit flatter.
🎉🎉🎉🎉 Monitor the deployment of the hubs here 👉 https://github.com/2i2c-org/infrastructure/actions/runs/6577624909 |
Thank you for reviewing @GeorgianaElena!!! |
I think it could be useful to be able to provide admin users with a different k8s ServiceAccount than for other users, as that would enable us grant them different cloud permissions.
This may be a pre-requisite of resolving #3038 and #2886.
What this PR includes in detail
custom.singleuserAdmin.initContainers
volume
tovm
(forvolume_mount
)custom.singleuserAdmin.serviceAccountName
as its a starting point for [Support] cryocloud: Allow bucket access based on hub admin status #2886