FR: Add ability to add custom templating for k3s containerd config
samip5 opened this issue · 7 comments
It would be great if I could add custom things for containerd, eg: https://github.com/kubevirt/containerized-data-importer/blob/f5d0b70b096abd856acff67eb4fc0cab0b474d89/doc/block_cri_ownership_config.md
This makes sense, and could easily be done here however I wonder if this should be a supported feature in the upstream Galaxy role instead. I do this in my home-ops repo to add support for spegel but it's not ideal because containerd needs to be restarted after it just started on cluster installation.
Either way I am not super hyped to maintain that containerd config here as it may change in newer versions.
I did create a FR in the k3s role too. ;)
Keep in mind that generated config.toml.tmpl
file can be very different depending on what args / config you feed to k3s which makes templating it out a royal pain in the ass.
Keep in mind that generated
config.toml.tmpl
file can be very different depending on what args / config you feed to k3s which makes templating it out a royal pain in the ass.
But: You can extend the K3s base template instead of copy-pasting the complete stock template out of the K3s source code. This is useful if you need to build on the existing configuration, and add a few extra lines at the end.
- https://docs.k3s.io/advanced?#configuring-containerd
So from what we discovered that method won't merge keys, it only appends config to the bottom of the containerd.toml.tmpl
Putting a hold on this until if/when this gets implemented k3s-io/k3s#9246
Upstream k3s won't support merging containerd configs (makes sense on their end) so I am going to close this as well.