Repository navigation
Description
What is the problem you're trying to solve
In Containerd v1.7 the CRI service status exposed CRI config loaded by Containerd.
containerd/pkg/cri/server/status.go
Line 68 in 7f7fdf5
| resp.Info["config"] = string(configByt) |
This config included the registry configuration.
containerd/pkg/cri/config/config.go
Line 279 in 7f7fdf5
| Registry Registry `toml:"registry" json:"registry"` |
During the changes made in #9152 this information was removed to decouple the dependency to the image service.
This has removed the ability to verify the configuration currently loaded by Containerd through the CRI API.
Describe the solution you'd like
I would like to find a away to expose the information either through some other API or to consider adding this information back to the current API. Having a look at the current CRI, there is no obvious endpoint where this information could be included. If we were to find another API we would have to find a new endpoint where this would be accessible.
Additional context
Spegel has depended on the ability to check the configuration to be able to verify that Containerd. The latest release of Containerd v2.0.0-rc.4 has stopped Spegel to work, because it requires configuration verification to work. Details about the issue is covered in spegel-org/spegel#579. Short term we can disable the verification specifically for Containerd v2 but long term it would be nice to find a solution.
Metadata
Metadata
Assignees
Labels
Type
Projects
- StatusShow more project fieldsDone
Activity
djdongjin commentedon Oct 21, 2024
I think this can be done by:
Config() criconfig.ImageServiceConfigmethod (orImageServiceConfigto avoid conflict withRuntimeService.Config) toImageServiceinterface (RuntimeServiceinterface has a similarConfig() criconfig.Configmethod) [1]criService.Statusmethod, callcriService.ImageService.Config()and save the config inresp.Info["imageserviceconfig"][2]Then the imageservice related config can be returned from the same API as before (though under a different key).
@dmcgowan does the above change make sense? (looks like a follow up for the PR https://github.com/containerd/containerd/pull/9152/files#r1445475051). If it sounds good I can make a change for it. thanks.
[1]
containerd/internal/cri/server/service.go
Line 97 in bc3ce87
[2]
containerd/internal/cri/server/status.go
Line 69 in bc3ce87
dosubot commentedon Jun 1, 2025
Hi, @phillebaba. I'm Dosu, and I'm helping the containerd team manage their backlog. I'm marking this issue as stale.
Issue Summary:
Config()method to theImageServiceinterface and modifying thecriService.Statusmethod.Next Steps:
Thank you for your understanding and contribution!
phillebaba commentedon Feb 20, 2026
Revisiting this issue now after things have stabilized. Looks like there is a way forward that would not be to invasive. I understand the want to not include the plugin as a dependency in the CRI server.
Would it be possible to pass both the transfer and image config as options to the server creation. That way if they are set they could be added to the info map along with the runtime config.
Happy to hear feedback on how to move forward with this.
phillebaba commentedon Feb 21, 2026
One idea I had now is that we could just list all plugins and pass their configuration. That may however be a bit too much configuration that we are passing. Code wise it is possible to do. I think we first need consensus on what and how much config is reasonable to expose in the CRI status. I do however think that image and transfer plugin configuration is very relevant to CRI status.