Skip to content

api,adaptation: add container image info - #302

Merged
mikebrow merged 1 commit into
containerd:mainfrom
eshaanm25:feat/image-digest
Aug 15, 2026
Merged

mikebrow merged 1 commit into
containerd:mainfrom
eshaanm25:feat/image-digest

Conversation

@eshaanm25

@eshaanm25 eshaanm25 commented Jul 22, 2026 •

Copy link
Copy Markdown

Add image information to container properties exposed to NRI plugins.

The following fields have been added:

  • name: The image reference (ex. registry.k8s.io/pause:3.10)
  • digest: Digest the image reference resolves to. Based on the image reference, it is a digest of one of:
    • image index
      • OCI: application/vnd.oci.image.index.v1+json
      • Docker: application/vnd.docker.distribution.manifest.list.v2+json
    • manifest
      • OCI: application/vnd.oci.image.manifest.v1+json
      • Docker: application/vnd.docker.distribution.manifest.v2+json
  • config_digest: The image configuration digest
    • OCI: application/vnd.oci.image.config.v1+json
    • Docker: application/vnd.docker.container.image.v1+json

Add image information (name, digest, config_digest) to container properties exposed to NRI plugins.

The following fields have been added:
- name: The image reference (ex. registry.k8s.io/pause:3.10)
- digest: The resolved image index (application/vnd.oci.image.index.v1+json) digest or manifest (application/vnd.oci.image.manifest.v1+json) digest
- config_digest: The image configuration (application/vnd.oci.image.config.v1+json) digest

Signed-off-by: Eshaan Mathur <[email protected]>
@klihub

klihub commented Aug 14, 2026 •

Copy link
Copy Markdown
Member

@eshaanm25 Thanks for the PR. You mention in #303 that you have PR for containerd with necessary runtime-side boilerplates/integration to populate the new fields. Do you have a similar PR or a working tree for CRI-O ?

@eshaanm25

Copy link
Copy Markdown
Author

I actually do have a mock PR for CRI-O, I wanted to ensure feature parity! Happy to make that PR too. If you'd like, I can make a draft PR to both container runtimes to show how the field will be populated.

@klihub
klihub self-requested a review August 14, 2026 16:01
@klihub

klihub commented Aug 14, 2026

Copy link
Copy Markdown
Member

I actually do have a mock PR for CRI-O, I wanted to ensure feature parity! Happy to make that PR too. If you'd like, I can make a draft PR to both container runtimes to show how the field will be populated.

Actually, I was mostly interested in whether you've tested that all the new bits of info are available in the CRI-O integration, too. The PR(s for both CRI-O and containerd) can probably wait till this is merged and available behind a new version tag. Although once this is merged, we could (and probably should) file PRs against containerd and CRI-O main/HEAD with the NRI deps pointing to the sha1-exact untagged version to get the necessary bits in.

@klihub
klihub requested a review from mikebrow August 14, 2026 16:05

@klihub klihub left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM.

eshaanm25 pushed a commit to eshaanm25/containerd that referenced this pull request Aug 14, 2026
- Record the resolved image reference and the image's target descriptor digest (the image index digest for multi-platform images, otherwise the manifest digest) in the container metadata at creation, alongside the existing ImageRef (image config digest)
- This makes the container's full image identity available to consumers of the container store. It is a prerequisite for exposing extended image identity to NRI plugins (containerd/nri#302)

Signed-off-by: Eshaan Mathur <[email protected]>

@mikebrow mikebrow left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM thanks!

@mikebrow

mikebrow commented Aug 14, 2026 •

Copy link
Copy Markdown
Member

nit on the field description .. oci is the primary support, but we should also work just fine with the schema v2 docker versions https://deepwiki.com/openshift/containers-image/4.1-docker-schema-support#manifest-media-types from which oci begat

@mikebrow

Copy link
Copy Markdown
Member

/cc @haircommander

@eshaanm25

eshaanm25 commented Aug 14, 2026 •

Copy link
Copy Markdown
Author

nit on the field description .. oci is the primary support, but we should also work just fine with the schema v2 docker versions https://deepwiki.com/openshift/containers-image/4.1-docker-schema-support#manifest-media-types from which oci begat

Totally agreed, updated the PR description to include schema v2 docker versions as well as OCI. Let me know if you'd like me to update the commit message or if there is place in the code where I can make this clear! I kept the NRI descriptions short, but happy to add detail if you think it would be helpful.

@mikebrow

mikebrow commented Aug 15, 2026 •

Copy link
Copy Markdown
Member

nit on the field description .. oci is the primary support, but we should also work just fine with the schema v2 docker versions https://deepwiki.com/openshift/containers-image/4.1-docker-schema-support#manifest-media-types from which oci begat

Totally agreed, updated the PR description to include schema v2 docker versions as well as OCI. Let me know if you'd like me to update the commit message or if there is place in the code where I can make this clear! I kept the NRI descriptions short, but happy to add detail if you think it would be helpful.

PR description is good for this PR IMO. Perhaps with a follow up add more description to the api / parameters in the image structure, only because there have been previous compatibility issues between containerd/crio for some of the CRI fields in the image service. In that follow up could add image to one of the sample plugins.

At some point in the future we may end up adding image services to the plugin interface.

@mikebrow
mikebrow merged commit e5bc392 into containerd:main Aug 15, 2026
16 checks passed
eshaanm25 pushed a commit to eshaanm25/containerd that referenced this pull request Aug 17, 2026
Bump to e5bc392 (containerd/nri#302) to pick up the new Container.image field exposed to NRI plugins (Image{name, digest, config_digest})

Signed-off-by: Eshaan Mathur <[email protected]>
eshaanm25 pushed a commit to eshaanm25/containerd that referenced this pull request Aug 17, 2026
Bump to e5bc392 (containerd/nri#302) to pick up the new Container.image field exposed to NRI plugins (Image{name, digest, config_digest})

Signed-off-by: Eshaan Mathur <[email protected]>
eshaanm25 pushed a commit to eshaanm25/containerd that referenced this pull request Aug 19, 2026
Bump to v0.12.2 (containerd/nri#302) to pick up the new Container.image field exposed to NRI plugins (Image{name, digest, config_digest})

Signed-off-by: Eshaan Mathur <[email protected]>
eshaanm25 pushed a commit to eshaanm25/containerd that referenced this pull request Aug 19, 2026
Bump to v0.12.2 (containerd/nri#302) to pick up the new Container.image field exposed to NRI plugins (Image{name, digest, config_digest})

Signed-off-by: Eshaan Mathur <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants