Skip to content

Export image config through GRPC service #10780

Closed

Description

@phillebaba

What is the problem you're trying to solve

In Containerd v1.7 the CRI service status exposed CRI config loaded by Containerd.

resp.Info["config"] = string(configByt)

This config included the registry configuration.

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.

Activity

  1. added
    area/cri
    on Oct 6, 2024
  2. djdongjin commented on Oct 21, 2024

    @djdongjin
    Member

    I think this can be done by:

    1. Add a Config() criconfig.ImageServiceConfig method (or ImageServiceConfig to avoid conflict with RuntimeService.Config) to ImageService interface (RuntimeService interface has a similar Config() criconfig.Config method) [1]
    2. In criService.Status method, call criService.ImageService.Config() and save the config in resp.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]

    type ImageService interface {

    [2]

    resp.Info["config"] = string(configByt)

  3. dosubot commented on Jun 1, 2025

    @dosubot

    Hi, @phillebaba. I'm Dosu, and I'm helping the containerd team manage their backlog. I'm marking this issue as stale.

    Issue Summary:

    • You raised a concern about the removal of registry configuration verification via the CRI API in Containerd version 1.7.
    • This change has impacted tools like Spegel, prompting a suggestion to expose the configuration through a new API or reintroduce it to the current API.
    • djdongjin proposed a solution involving the addition of a Config() method to the ImageService interface and modifying the criService.Status method.
    • Feedback was sought from dmcgowan on this approach, with djdongjin offering to implement the changes if deemed appropriate.

    Next Steps:

    • Please confirm if this issue is still relevant to the latest version of the containerd repository by commenting on the issue.
    • If no further input is provided, the issue will be automatically closed in 7 days.

    Thank you for your understanding and contribution!

  4. phillebaba commented on Feb 20, 2026

    @phillebaba
    ContributorAuthor

    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.

  5. phillebaba commented on Feb 21, 2026

    @phillebaba
    ContributorAuthor

    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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    area/crikind/feature

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions