daemon: allow shimv2 runtimes to be configured#45032
Merged
thaJeztah merged 1 commit intomoby:masterfrom Mar 2, 2023
Merged
Conversation
2 tasks
Kubernetes only permits RuntimeClass values which are valid lowercase RFC 1123 labels, which disallows the period character. This prevents cri-dockerd from being able to support configuring alternative shimv2 runtimes for a pod as shimv2 runtime names must contain at least one period character. Add support for configuring named shimv2 runtimes in daemon.json so that runtime names can be aliased to Kubernetes-compatible names. Allow options to be set on shimv2 runtimes in daemon.json. The names of the new daemon runtime config fields have been selected to correspond with the equivalent field names in cri-containerd's configuration so that users can more easily follow documentation from the runtime vendor written for cri-containerd and apply it to daemon.json. Signed-off-by: Cory Snider <csnider@mirantis.com>
neersighted
approved these changes
Mar 2, 2023
thaJeztah
approved these changes
Mar 2, 2023
Member
thaJeztah
left a comment
There was a problem hiding this comment.
LGTM (from discussing and looking over)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Kubernetes only permits RuntimeClass values which are valid lowercase RFC 1123 labels, which disallows the period character. This prevents cri-dockerd from being able to support configuring alternative shimv2 runtimes for a pod as shimv2 runtime names must contain at least one period character.
- What I did
- How I did it
I took heavy inspiration from cri-containerd configuration and its implementation. The names of the new daemon runtime config fields have been selected to correspond with the equivalent field names in cri-containerd's configuration so that users can more easily follow documentation from the runtime vendor written for cri-containerd and apply it to daemon.json.
- How to verify it
Create a
/etc/docker/daemon.jsoncontaining{ "runtimes": { "custom": { "runtime-type": "io.containerd.runc.v2", "options": { "BinaryName": "/usr/local/bin/doesnotexist" } } } }and (re)start the daemon. Try running a container with that runtime and examine the error message to see if the
BinaryNameoption was respected.- Description for the changelog
- A picture of a cute animal (not mandatory but encouraged)