Allow the restriction of Kubernetes agent access to protected branches
requested to merge b310-digital/gitlab-agent:467936-nwittstruck-limit-kubernetes-agent-access-to-protected-branches into master
-
Please check this box if this contribution uses AI-generated content (including content generated by GitLab Duo features) as outlined in the GitLab DCO & CLA
What does this MR do and why?
This MR allows the restriction of Kubernetes agent access to protected branches, see gitlab-org/gitlab#467936 (closed).
This MR adds the option to set a protected_branches_only
flag in the ci_access.yml
for projects and groups.
ci_access:
project:
- id: example/example
protected_branches_only: true
environments:
- dev
groups:
- id: example/example
protected_branches_only: true
environments:
- dev
It's similar to !793 (merged), which adds configuration options to limit the agent to specific environments.
Edited by Nicholas Wittstruck