Skip to content

List containerd's images: images list --context=<ctx>#24

Merged
solsson merged 1 commit into
mainfrom
images-list-from-cluster
May 12, 2026
Merged

List containerd's images: images list --context=<ctx>#24
solsson merged 1 commit into
mainfrom
images-list-from-cluster

Conversation

@solsson
Copy link
Copy Markdown
Contributor

@solsson solsson commented May 12, 2026

No description provided.

`y-cluster images list` overloads to read from a cluster's
k8s.io containerd namespace. Mutually exclusive with the
positional YAML input -- same conceptual question
("what images are in this scope?"), different source.

Output is one row per stored manifest (digest-aliases of
the same content fold together, the bare sha256:<hex>
config-digest row containerd writes is filtered out),
sorted by descending compressed size by default.
--sort=name switches to alphabetical; --format=json emits
[{ref, digest, size_bytes, size_human}] for piping.

Implementation parses `ctr -n k8s.io image list` tabular
output -- the same format pkg/images/load.go already
relies on -- and reads the SIZE column back from its IEC
units. Stable across the containerd versions y-cluster
targets without depending on ctr's --format json shape.

When many rows fold into one, refRank picks the most
informative form: name:tag@digest > name@digest > name:tag
> anything else. Hostport ":port" before the last slash
isn't counted as a tag (the standard containerd-ref edge
case stripTag already handles).

Refs specs/y-cluster/FEATURE_REQUEST_IMAGES_LIST_FROM_CLUSTER.md
@solsson solsson merged commit da717f9 into main May 12, 2026
11 checks passed
solsson pushed a commit to Yolean/ystack that referenced this pull request May 12, 2026
Bumps host bin (bin/y-bin.runner.yaml) and the in-cluster
y-kustomize Deployment image across four consecutive y-cluster
releases:

- v0.4.2: `images load` accepts remote refs (Yolean/y-cluster#22)
- v0.4.3: fix `images load` for digest-only refs (Yolean/y-cluster#23)
- v0.4.4: `images list --context=<ctx>` subcommand
  (Yolean/y-cluster#24) and tunable Gateway API resource requests
  (Yolean/y-cluster#25)
- v0.4.5: re-fix digest-only image tagging and gateway resource
  requests (Yolean/y-cluster#26)

Image digest verified via `crane digest ghcr.io/yolean/y-cluster:v0.4.5`.
sha256 sums copied from v0.4.5's checksums.txt.
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.

1 participant