Open r65535 opened 8 months ago
The Spegel embedded registry mirror only supports mirroring things that can be loaded into containerd's image store. It has no store of its own. Containerd does not, as far as I know, support storing arbitrary OCI artifacts in its image store.
Feel free to open an issue at https://github.com/XenitAB/spegel and/or https://github.com/containerd/containerd - once they support it, we can too.
Or perhaps I'm misunderstanding what you mean by "miscellaneous" / "arbitrary" OCI images. Are you just asking for periodic re-import of tarballs from the images directory, instead of only importing them on startup?
That's been asked for in the past, but hasn't been prioritized. Homebrewing something with ctr -n k8s.io image import
is probably your best bet.
As an example, I want to deploy bitnami/zookeeper to k3s in an airgapped environment.
/var/lib/rancher/k3s/server/static/charts
HelmChart
CRD in /var/lib/rancher/k3s/server/manifests
But I can't load the zookeeper.tar containing the container image into the new embedded registry, without manually running k3s ctr images import zookeeper.tar
. It'd be great if I could drop in that zookeeper.tar to a directory on the k3s server, and it auto-loads that image into the registry
Thanks for the additional context. I'll leave this on the backlog.
Autoloading approach can also help with managing image load times by deferring image imports for https://github.com/k3s-io/k3s/issues/9242
Is your feature request related to a problem? Please describe. k3s can load a bunch of resources from disk:
/var/lib/rancher/k3s/server/manifests
/var/lib/rancher/k3s/server/static/charts
/var/lib/rancher/k3s/agent/images/k3s-airgap-images-amd64.tar.zst
With the new embedded registry, it'd be nice to also have a directory that can auto-load in miscellaneous OCI images (similar to
k3s-airgap-images-amd64.tar.zst
, but for arbitrary images). Especially in an edge/airgapped environment.Describe alternatives you've considered A crontab that finds files in a local directory and
k3s ctr images import
each TAR file 😓