pulp / pulp_container

Pulp Container Registry
https://docs.pulpproject.org/pulp_container/
GNU General Public License v2.0
23 stars 44 forks source link

Add support for domains #1534

Open lubosmj opened 8 months ago

lubosmj commented 8 months ago

Domains is an optional feature that allows multi-tenancy.

In the Pulp Container plugin, we need to deal with the fact that we have a single registry (a single source of truth, a remote server) that can be accessed by anyone. An open question is whether we should have a different namespace per each domain when serving the content or not. This would induce the requirement to reconsider redirects. Usually, CONTENT_PATH_PREFIX is a subject to change when dealing with domains' scopes.

https://docs.pulpproject.org/pulpcore/workflows/domains-multi-tenancy.html https://docs.pulpproject.org/pulpcore/plugin_dev/plugin-writer/concepts/domains/domains_compatibility.html

Plugins adding domains support: https://github.com/pulp/pulp_rpm/pull/3106 https://github.com/pulp/pulp_ostree/pull/346

lubosmj commented 5 months ago

Right now, we are issuing redirects, like this:

What would we like to implement?

  1. v2/repo/manifests/bla -> pulp/default/content/manifests/id/ <----- bad, we do not know the domain ID from api-app
  2. v2/default/repo/manifests/bla -> pulp/default/content/manifests/id/ <----- bad, we are breaking the standardized Registry API
  3. No domains for pulp-container? Partial exclusion from the pulpcore's domain facility?

Needs more thinking...

lubosmj commented 5 months ago

The expansion to the domains' path will need to be identified on the pull level:

podman pull pulp.example.com/ipanova/busybox (no specified domain/namespace) -> podman pull pulp.example.com/default/ipanova/busybox

podman pull pulp.example.com/redhat/ipanova/busybox -> podman pull pulp.example.com/redhat/ipanova/busybox

The content-app path will be then explicitly retrieved from the API, like pulp/redhat/manifests/blabla.