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
Add command to retrieve images used by k8s-snap #501
Add a hidden command that can be used to retrieve the list of images a particular build of k8s-snap will use.
Changes
Add pkg/k8sd/images package. This exports two functions: Registrer and Images
Individual packages "register" their images by using a func init() { images.Register(...) }
The list-images command simply retrieves the list using images.Images().
Notes
This way, individual implementations (e.g. calico or cilium) simply have an init() that registers the images. init() does not run for packages that are not imported by the code.
We currently implicitly depend on more images than just the ones in our configs. Added TODOs to resolve them separately.
Summary
Add a hidden command that can be used to retrieve the list of images a particular build of
k8s-snap
will use.Changes
pkg/k8sd/images
package. This exports two functions:Registrer
andImages
func init() { images.Register(...) }
images.Images()
.Notes
init()
that registers the images.init()
does not run for packages that are not imported by the code.