Set a limit on the number of non-terminated workspaces per user
MR: Pending
Description
In the initial workspaces beta, a developer can create as many workspaces as they want. In #410609 (closed) we are looking to implement a limit on the total number of non-terminated workspaces that can be associated with any agent at any given time, but nothing prevents a single user from creating all those workspaces. In larger organizations, and to ensure wider adoption of this feature can scale across a team, an administrator should be able to limit an individual developer's ability to saturate cloud resources.
Configure an agent to limit the number of concurrent, non-terminated workspaces that a user can have.
Default should be unlimited
.
Acceptance Criteria
-
An attribute in agent configuration which allows agent administrators to set the number of workspaces that each user can provision using that specific agent.
Technical Requirements
- Update the protobuf definition for agent configuration in gitlab-agent. Field will be called
max_workspaces_per_user
. - Add new field in
remote_developemnt_agent_configs
table which is an integer. The default value will be-1
which would mean the user can createunlimited
workspaces from the agent. - Before creating a workspace, add a check to ensure that this limit is not breached for the given user-agent combination.
This page may contain information related to upcoming products, features and functionality. It is important to note that the information presented is for informational purposes only, so please do not rely on the information for purchasing or planning purposes. Just like with all projects, the items mentioned on the page are subject to change or delay, and the development, release, and timing of any products, features, or functionality remain at the sole discretion of GitLab Inc.