fix(dfinit): support images CRI plugin in containerd v2 configs - #2004
Merged
gaius-qi merged 2 commits intoAug 25, 2026
Merged
Conversation
544129603
force-pushed
the
codex/fix-aks-containerd-v2-images-plugin
branch
from
August 24, 2026 07:48
5633438 to
d2eb65f
Compare
Signed-off-by: Startalker <438747480@qq.com>
544129603
force-pushed
the
codex/fix-aks-containerd-v2-images-plugin
branch
from
August 24, 2026 07:52
d2eb65f to
8267c00
Compare
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #2004 +/- ##
==========================================
+ Coverage 53.59% 54.18% +0.59%
==========================================
Files 100 101 +1
Lines 26908 27237 +329
==========================================
+ Hits 14420 14759 +339
+ Misses 12488 12478 -10
🚀 New features to boost your workflow:
|
Contributor
Author
|
All code checks now pass. The remaining Classify PR check requires one impact label. Issue #1993 is labeled enhancement, but I do not have permission to add labels to this repository; please add the enhancement label during triage. |
544129603
marked this pull request as ready for review
August 24, 2026 09:27
544129603
requested review from
BruceAko,
CormickKneey,
anjia0532,
hhhhsdxxxx,
mingcheng and
yyzai384
August 24, 2026 09:27
…lugin selection Allow users to explicitly specify which CRI plugin ID owns the registry configuration (e.g. `io.containerd.cri.v1.images`) instead of relying on automatic detection. This is useful for environments like AKS that ship version 2 configs with the containerd 2.x images plugin. The auto-detection logic is refactored into `get_cri_plugin_id` and now iterates candidates in version-preferred order, falling back to the other plugin if only it is present in the config. Signed-off-by: Gaius <gaius.qi@gmail.com>
gaius-qi
enabled auto-merge (squash)
August 25, 2026 15:40
CormickKneey
approved these changes
Aug 25, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Select the containerd CRI plugin from the plugin tables present in config.toml, while keeping the version-specific plugin as the preferred choice.
This allows AKS containerd 2 configurations that expose io.containerd.cri.v1.images instead of io.containerd.grpc.v1.cri to use registry config_path mode.
A regression test covers a version 2 configuration containing only the images CRI plugin.
Related Issue
Fixes #1993
Motivation and Context
Some managed containerd 2 deployments use the newer images CRI plugin table even though the top-level config version is still 2. Selecting only by version makes dfinit look for a plugin table that does not exist and fail before writing registry configuration.
Screenshots (if appropriate)
N/A