Skip to content

[Feat]: Support namespace parameter from containerd (?ns=...) as sync filter #4187

Description

@cruftex

Is your feature request related to a problem? Please describe.

To use Zot as a mirror for Kubernetes its needed to create a config file for each origin registry on every node and keep that consistent and extend it whenever a new registry needs to be added.

Example for supporting two registries:

/etc/containerd/certs.d/registry.k8s.io/hosts.toml:

server = "https://zotregistry.internal:5000/v2/registry.k8s.io"
capabilities = ["pull", "resolve", "push"]
override_path = true

/etc/containerd/certs.d/docker.io/hosts.toml:

server = "https://zotregistry.internal:5000/v2/docker.io"
capabilities = ["pull", "resolve", "push"]
override_path = true

This will generate request with the registry as prefix like:

/v2/registry.k8s.io/pause/manifests/3.10.1

Howver, containerd adds a ?ns= parameter by default and the requests look like:

/v2/pause/manifests/3.10.1?ns=registry.k8s.io

The authoritative documentation seems to be here:
https://containerd.io/docs/main/hosts/

Describe the solution you'd like

Support of the ns parameter as mirror/sync filter. This way, only one config entry is needed for the mirror.

Describe alternatives you've considered

Reconfigure and restart containerd on all nodes whenever a registry needs to be added.

Additional context

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    featureNew feature or requestrm-externalRoadmap item submitted by non-maintainers

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions