colima
colima copied to clipboard
Support patching base containerd config
I am working with colima to develop local development workflows in golang. One of the challenges here is that the VM that colima spins up from https://github.com/abiosoft/alpine-lima has the base containerd config file present on the host at startup time. This means the generated lima.yaml
configfile has the containerd settings turned off and does not do the default overrides present in https://github.com/lima-vm/lima/blob/master/pkg/cidata/cidata.TEMPLATE.d/boot/40-install-containerd.sh.
I'd love to have a workflow that looks like the kind cluster patches that allows me to configure the containerd plugin settings: https://kind.sigs.k8s.io/docs/user/local-registry/#create-a-cluster-and-registry. I can definitely help contribute here if pointed in the right direction, but wanted to get some input from the maintainers before proceeding.
I am also using an M1 Mac, and I'm developing workflows on top of colima. Would love to help testing in certain areas of need!
The lima-provided containerd actually requires systemd as can be seen here. However, systemd is missing on Alpine.
If you mainly need to configure the underlying containerd, that can be easily supported by following a similar pattern to Docker config as specified in the readme.
On first startup, Colima generates Docker daemon.json file at $HOME/.colima/docker/daemon.json. Simply modify the daemon.json file accordingly and restart Colima.
Will that suffice or there are additional requirements?
Thanks.
Thanks for the response, the motivation for avoiding the lima-provided settings makes sense.
I think restarting colima would be an acceptable workflow after editing the containerd config.toml file.
ok, im looking into the code here for the docker daemon and i do wonder if we need some default settings in the containerd config.toml for it to start up successfully. looks like the default settings for containerd (with a missing config.toml file) do not match the current /etc/containerd/config.toml (for example, default uses the rancher pause container instead of gcr.k8s.io)
ok, im looking into the code here for the docker daemon and i do wonder if we need some default settings in the containerd config.toml for it to start up successfully. looks like the default settings for containerd (with a missing config.toml file) do not match the current /etc/containerd/config.toml (for example, default uses the rancher pause container instead of gcr.k8s.io)
considering the amount of config in case of containerd unlike docker, I would be prefer to rely on the default one generated by containerd rather than roll one ourselves.