Move Multiple Deployments limit from top-level namespace to project if `unique_domain` is enabled.
Context
Pages muliple deployment limits were introduced to protect our /api/v*/internal/pages
, since that endpoint returns all the pages deployments projects from a given top level namespace, not limiting how many pages versions a namespace can have would put even more pressure on that endpoint.
Solution
We link the multiple deployments limit with the domain, rather than the namespace. This means
- If the project uses a unique domain
my-pages-site-63af8.gitlab.io
, the limit applies to the project - If the project uses the namespace domain
my-group.gitlab.io
(with the project URL then being path-based, eg.group.gitlab.io/my-pages-site
), the limit applies to the namespace, and it includes all other projects in that namespace that use a namespace-based domain, too.
Edited by Janis Altherr