-
Notifications
You must be signed in to change notification settings - Fork 13
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Go rewrite #46
base: main
Are you sure you want to change the base?
Go rewrite #46
Conversation
We need to find a different way to update the containerd config, Here's what NVIDIA is doing: https://github.com/NVIDIA/nvidia-container-toolkit/blob/807c87e057e13fbd559369b8fd722cc7a6f4e5bb/pkg/config/engine/containerd/config_v2.go#L27 |
@phyrog regarding the update of the containerd config.toml. The following idea comes to my mind: Create a new TOML file that contains all the data found on a set of shim configuration files and then import only this merged file inside the containerd Deletions or updates could be done in the same way by generating the config file with updates keys (for update) or just by not selecting certain configs (deletion). |
@crabarca Importing overwrites the whole
One caveat here is that if a user manually updates something in the plugins section of |
Unfortunately neither https://github.com/BurntSushi/toml nor https://github.com/pelletier/go-toml support preserving comments when unmarshalling/marshalling, so if we modified Edit: I think https://github.com/pelletier/go-toml in version 1 might be able to do it using the |
I went down the rabbit hole on both libraries to see if there were some detailed If we think more deeply about this problem, the To conclude, I would not go after trying to merge comments and just creating an intermediary config file which contains the merge of the shim configurations and won't contain comments, which then is going to be imported into |
@crabarca I was mainly thinking about the libraries because we need to potentially modify
For the custom config file, I agree, preserving comments is not relevant. |
Signed-off-by: Sven Pfennig <s.pfennig@reply.de>
Co-authored-by: Daniel Aberger <toksikk@users.noreply.github.com>
This reverts commit 08fecbd.
Will close #39. For now used for tracking purposes.