feat: Add workspace management for admins #1652
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Important
The database migration will fail if there are multiple users with the same user name but different casing! Scan your users list to remove duplicated users before updating.
Implements some parts of #998 and workspace related changes proposed in #1645.
Resolves #191.
The pvc_name and size are now stored in our database, which enables us to use a new algorithm for persistent volume names without breaking existing volumes. The new algorithm is independent from the username and uses a random UUID as name instead.
Even though the workspace/user relationship is modeled as many-to-many relationship, each user can only have one workspace. It's intended to add support for more workspaces in the future and the database structure is already set up properly.
The CLI has been updated and shows all persistent volumes created before this update as "Persistent user workspace (legacy)". In addition, the size and annotations are now preserved when performing a backup / restore of a workspace via the CLI. It also fixes an issue that the Pod isn't terminated if the command is aborted with
CTRL + C
while "Waiting for Pod".The workspaces are also displayed in the UI with their corresponding size in the user profiles for administrators. Workspaces incl. their content can be deleted. In addition, workspace are now also cleaned up during user deletion.
This PR also makes username changes non-breaking.