Runner Controller scoping - Group & Project levels (Phase 2)
Everyone can contribute. Help move this issue forward while earning points, leveling up and collecting rewards.
Overview
Extend Runner Controller scoping to support group-level and project-level scopings.
Context
This is a follow-up iteration after instance and runner scoping are complete. Group and project scopings enable more granular control for organizations.
Runner Controllers function like a "service":
- Can have any and multiple types of scope (cell, group, project, runner)
- Scopes always apply "downward"
- Group scope applies to all projects within the group
- Project scope applies to jobs in that specific project
Scope
Database Tables
ci_runner_controller_scopings_group
| Column | Type | Notes |
|---|---|---|
id |
bigint | Primary key |
runner_controller_id |
bigint | FK → ci_runner_controllers
|
namespace_id |
bigint | FK → namespaces (group) |
-
gitlab_schema=gitlab_ci(sharding key:namespace_id)
ci_runner_controller_scopings_project
| Column | Type | Notes |
|---|---|---|
id |
bigint | Primary key |
runner_controller_id |
bigint | FK → ci_runner_controllers
|
project_id |
bigint | FK → projects
|
-
gitlab_schema=gitlab_ci(sharding key:project_id)
API Extensions
External API
POST /api/v4/runner_controllers/:id/scopings/groups
DELETE /api/v4/runner_controllers/:id/scopings/groups/:scoping_id
POST /api/v4/runner_controllers/:id/scopings/projects
DELETE /api/v4/runner_controllers/:id/scopings/projects/:scoping_id
Internal API
- Update Job Router to query group/project scopings
Behavior
- Scopes always apply "downward"
- Group scope applies to all projects within the group
- Project scope applies to jobs in that specific project
Dependencies
- Blocked by: #582825 (closed) (Database - instance/runner)
- Blocked by: External API issue
- Blocked by: Internal API issue
Acceptance Criteria
- Group scoping table and model
- Project scoping table and model
- External API for group/project scopings
- Internal API updated to query group/project scopings
- Documentation updated
Edited by 🤖 GitLab Bot 🤖