fix pinnedImages image config json name#11221
fix pinnedImages image config json name#11221pacoxu wants to merge 2 commits intocontainerd:mainfrom
Conversation
|
Hi @pacoxu. Thanks for your PR. I'm waiting for a containerd member to verify that this patch is reasonable to test. If it is, they should reply with Once the patch is verified, the new status will be reflected by the I understand the commands that are listed here. DetailsInstructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. |
| // Migrated from: | ||
| // (PluginConfig).SandboxImage string `toml:"sandbox_image" json:"sandboxImage"` | ||
| PinnedImages map[string]string `toml:"pinned_images" json:"pinned_images"` | ||
| PinnedImages map[string]string `toml:"pinned_images" json:"pinnedImages"` |
There was a problem hiding this comment.
Curious; will this fix the linked issue? Because I see that mentions code that looks for (commented above) sandBoxImage, not pinnedImages (plural); https://github.com/kubernetes/kubernetes/blob/8f8c94a04d00e59d286fe4387197bc62c6a4f374/cmd/kubeadm/app/preflight/checks.go#L841C2-L848C3
There was a problem hiding this comment.
not the same issue.
Just find this potential typo during looking into that issue.
There was a problem hiding this comment.
sandboxImage vs. pinnedImages is handled in this configuration migration:
var pinnedImages map[string]interface{}
if v, ok := dst["pinned_images"]; ok {
pinnedImages = v.(map[string]interface{})
} else {
pinnedImages = map[string]interface{}{}
}
if simage, ok := src["sandbox_image"]; ok {
pinnedImages["sandbox"] = simage
}
if len(pinnedImages) > 0 {
dst["pinned_images"] = pinnedImages
}
when it moved from the RuntimeConfig to the ImageConfig, in 3baf5ed
You still get some warning, even after the migration (until updated to v3)
level=warning msg="Ignoring unknown key in TOML for plugin" error="strict mode: fields in the document are missing in the target struct key=sandbox_image plugin=io.containerd.cri.v1.runtime
maybe it needs to delete the sandbox_image, during the above process?
There was a problem hiding this comment.
maybe it needs to delete the sandbox_image, during the above process?
Yeah there are many other fields that also have the warning even after the migration. I have a PR to fix that a while ago #10980. Need to revisit the PR and see if I can get some review there then.
There was a problem hiding this comment.
@djdongjin #10980 was merged.
@thaJeztah Could you take a look and see if the current PR is meaningful?
Signed-off-by: Paco Xu <[email protected]>
e20779d to
b98697d
Compare
|
Adding label DetailsInstructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. |
This is introduced in https://github.com/containerd/containerd/pull/9617/files#diff-e8d6dbb2c75752c173c570eabb9961d5b0f3273b682788f2d7eab2f5ffd5d7d6R280.
It seems to be a typo.
cc @fuweid @dmcgowan
BTW, I saw this when looking into kubernetes/kubeadm#3146. In containerd v2.0,
crictl infowill not include image related configurations, including the sandbox image. Is this intended?