bottlerocket icon indicating copy to clipboard operation
bottlerocket copied to clipboard

Inline registry mirror configuration is deprecated in containerd

Open alex-berger opened this issue 3 years ago • 9 comments

What I'd like:

Inline registry mirror configuration as used by bottlerocket is deprecated since containerd version 1.5.0 and might be removed in containerd version 1.7.

Bottlerocket should be update to use the new approach to configure the image registries for containerd, as outlined in

  • https://github.com/containerd/containerd/blob/v1.5.9/docs/cri/registry.md
  • and https://github.com/containerd/containerd/blob/v1.5.9/docs/hosts.md

Setting config_path instead of inlining the mirror configuartion,

[plugins."io.containerd.grpc.v1.cri".registry]
   config_path = "/etc/containerd/certs.d"

and generating the corresponding directory structure and files

$ tree /etc/containerd/certs.d
/etc/containerd/certs.d
└── docker.io
    └── hosts.toml

$ cat /etc/containerd/certs.d/docker.io/hosts.toml
server = "https://docker.io"

[host."https://registry-1.docker.io"]
  capabilities = ["pull", "resolve"]

alex-berger avatar Feb 18 '22 08:02 alex-berger

I think that this feature would be good to solve as there are a lot of other feature requests which would be solved by just updating the mirror configuration. Instead of having to expose every single parameter users would be able to write their own mirror configuration files which would be placed in the correct file path.

phillebaba avatar Mar 24 '23 08:03 phillebaba

FYI it's still there in 1.7.0 :)

https://github.com/containerd/containerd/blob/v1.7.0/pkg/cri/config/config.go#L209

dims avatar Nov 15 '23 18:11 dims

AND 2.0 beta

https://github.com/containerd/containerd/blob/v2.0.0-beta.0/pkg/cri/config/config.go#L189-L190

dims avatar Nov 15 '23 18:11 dims

Is there any update on this? I'd really like to install "spegel" and can't because of this issue.

https://github.com/spegel-org/spegel/issues/47

empath-nirvana avatar May 06 '24 13:05 empath-nirvana

AND 2.0 beta

https://github.com/containerd/containerd/blob/v2.0.0-beta.0/pkg/cri/config/config.go#L189-L190

What if it's only hanging about because people keep using it and the maintainers are being overly cautious because people haven't stopped using it?

danielloader avatar Jun 20 '24 08:06 danielloader

Any update on this? is Bottlerocket going to support this

sumeet-zuora avatar Oct 01 '24 09:10 sumeet-zuora

Appears to have been slated for removal in containerd 2.1, pushed back from its previous targeted removal of 2.0.

https://github.com/containerd/containerd/blob/e514bae935a24e78c1e66ae4d609040b9f14a8e4/internal/cri/config/config.go#L221-L225

naanselmo avatar Dec 03 '24 16:12 naanselmo

Are there any updates on this issue? It seems that the removal has been pushed back to version 2.2, for which a beta version has just been released.

jon-rei avatar Oct 02 '25 06:10 jon-rei

2.3 now - it's basically becoming a little meme I enjoy every time I check the main branch.

https://github.com/containerd/containerd/blob/3d0df8618a1fc217b8ce4e2656b6a2f60e52e2c2/internal/cri/config/config.go#L236

It's probably not a great idea to time jumping over because of another projects unpredictable timelines for deprecating if there's an alternative already provided to move to.

danielloader avatar Oct 24 '25 12:10 danielloader