spegel icon indicating copy to clipboard operation
spegel copied to clipboard

Implement support to disable registry filtering in Containerd

Open phillebaba opened this issue 11 months ago • 6 comments

Some users may want to mirror all images without specifying a registry. This change modifies the filtering regex to allow for an empty filter registries list. Images will still be filtered however to contain a registry in the reference.

This change would resolve a k3s specific use case for now, but should be supported as an option in Spegel also. https://github.com/k3s-io/k3s/issues/9590

phillebaba avatar Feb 29 '24 13:02 phillebaba

With no registry configured, no mirror is configured in containerd config. Shouldn't you add a default configuration to mirror all registries to spegel in this case ? There is a special hostname "_default" for this: https://github.com/containerd/containerd/blob/main/docs/hosts.md#registry-host-namespace.

vflaux avatar Jun 19 '24 13:06 vflaux

@phillebaba Is there anything blocking this from merging?

sfackler avatar Aug 05 '24 20:08 sfackler

@sfackler not really, I will rebase and just check my work one more time before merging. Just forgot about this while doing other stuff.

phillebaba avatar Aug 05 '24 21:08 phillebaba

Thanks!

sfackler avatar Aug 05 '24 21:08 sfackler

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Files with missing lines Coverage Δ
pkg/oci/containerd.go 59.42% <100.00%> (+0.23%) :arrow_up:

codecov[bot] avatar Aug 05 '24 22:08 codecov[bot]

Hi, The current chart do not add the --registry if spegel.registries is empty in values but spegel expect this argument. Either the chart should add it even if empty or this argument should be optional with empty array by default.

vflaux avatar Sep 12 '24 18:09 vflaux