Skip to content

Arbitrary image pinning support (i.e. to exclude from kubelet's image GC) #563

Description

@cielavenir

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 containerd/containerd#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?

Activity

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

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions