Mirantis / Mirantis/cri-dockerd
Arbitrary image pinning support (i.e. to exclude from kubelet's image GC)
Nobody has claimed this yet.
- Dominant language
- Go
- Stars
- 1.4k
- Forks
- 356
- Avg merge
- 4d 4h
- Merged PRs (30d)
- 3
Description
When containerd-snapshotter is configured, ctr can access docker image list by --namespace moby:
└─$ sudo ctr --namespace moby images ls
REF TYPE DIGEST SIZE PLATFORMS LABELS
docker.private/ci-abcde application/vnd.oci.image.index.v1+json sha256:95920585adb12563ed245745d12766fb1f33d74514a07fbb129c00d830fa9507 2.7 GiB linux/amd64 io.cri-containerd.pinned=pinned
└─$ sudo k3s crictl images -o json | jq '.images[] | {repoTags,id,pinned}'
{
"repoTags": [
"docker.private/ci-abcde"
],
"id": "sha256:95920585adb12563ed245745d12766fb1f33d74514a07fbb129c00d830fa9507",
"pinned": false
}
According to https://github.com/containerd/containerd/issues/6930 , io.cri-containerd.pinned=pinned label should cause cri to recognize the image is pinned, but it does not.
After checking with Claude, most likely that cri-dockerd does not have the feature to read that label. So, could you add that?
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by tracing cri-dockerd's CRI image-listing and image-pinning handling, using the reported ctr label and crictl JSON as the reproduction. Check existing image-related tests before making changes. Done means images labeled io.cri-containerd.pinned=pinned are reported as pinned and excluded from kubelet image garbage collection.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- docker, go, kubernetes
- Domain
- api, backend
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Active
- Clarity
- Mostly clear
- Newbie friendliness
- 64/100