Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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
Add option to specify containerd runtime #4141
Add option to specify containerd runtime #4141
Changes from all commits
ae8e604
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Shouldn't this support options for runc binary path, cgroup driver, etc?
I also guess this should be
map[string]interface{}
to support multiple runtime classes in the future.i.e., The config structure should be similar to the config structure of containerd/CRI.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am not sure how to pass that to containerd. What I just wanted to achieve is to be able to override
client.defaultRuntime
. Because there are cough, cough platforms where runtime isn't mature enough to be declared The Default.The lack of such configuration option leaded to FreeBSD runtime being hardcoded in buildkit. I'm in the same boat with macOS.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So, my idea is: with these changes, one can configure runtime options in containerd config, while using buildkit to select needed runtime. Or, option added here can just be used to specify path path to runtime binary. Exposing the full runtime configuration through buildkit config is too much extending the scope of the task.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Some related work in moby;
I need to refresh my memory (but perhaps the code describes it), but ISTR, we only allowed paths etc to be configured for the legacy bits, and otherwise only allow a (fully qualified?) reference to be specified, or at least from the client side (to prevent a arbitrary paths to be passed that are not in the server's
PATH
).There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think I missed this originally. We should probably make sure to cover this is in a first pass - I wrote up a possible implementation: jedevc@22d9bb1. @AkihiroSuda @tonistiigi wdyt? (I took inspiration from how CRI does it today). @slonopotamus you happy to pull that change into your branch (or I can force-push)?
Without a way to configure the runtime, I think the feature is quite limited (e.g. I have a use case for wanting to override the runc binary used by the
io.containerd.runc.v2
runtime, which is possible by using thebinary_name
option). Containerd doesn't seem to have any other way to configure this, so we need to allow this configuration in buildkit if we want to allow users this kind of freedom.Even if we don't take this now, we need to provide a place in config fields to allow this kind of configuration. Previously we had:
I think something like this should work easily:
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@jedevc I'm perfectly fine if you create a separate PR. I just need a way to specify which runtime to use, it isn't really important what lines one would need to write into config file, it is easy to adapt.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Opened in #4279.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe add a TODO saying it should be removed once containerd/containerd#8964 comes with a containerd release?