canonical / k8s-snap

Canonical Kubernetes is an opinionated and CNCF conformant Kubernetes operated by Snaps and Charms, which come together to bring simplified operations and an enhanced security posture on any infrastructure.
GNU General Public License v3.0
40 stars 11 forks source link

Use a containerd plugin for side-loading images #502

Closed neoaggelos closed 3 months ago

neoaggelos commented 3 months ago

Summary

Add a containerd plugin that sideloads images when containerd starts (and, optionally, at a refresh interval)

The plugin can be configured by a section like this in the config.toml file of containerd (or in a separate file):

[plugins."io.containerd.service.v1.sideload-images"]
  disabled = true 
  sources = ["path1", "path2"]
  namespace = "k8s.io"

The default behaviour is to attempt to sideload any tar files found in /var/snap/k8s/common/images when containerd starts.

Changes