-
Notifications
You must be signed in to change notification settings - Fork 18.6k
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 configuration option for cri-containerd #37519
Conversation
Disable cri plugin by default in containerd and allows an option to enable the plugin. This only has an effect on containerd when supervised by dockerd. When containerd is managed outside of dockerd, the configuration is not effected. Signed-off-by: Derek McGowan <derek@mcgstyle.net>
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.
LGTM
Is it really even feasible for someone to use docker managed containerd with k8s? |
@@ -31,6 +31,14 @@ func (r *remote) setDefaults() { | |||
if r.OOMScore == 0 { | |||
r.OOMScore = -999 | |||
} | |||
|
|||
for key, conf := range r.pluginConfs.Plugins { | |||
if conf == nil { |
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.
this is a little weird to handle an unset.
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 liked this more than having a WithDisablePlugin
, but could do that as an alternative. This isn't a publicly used interface though and I am trying to refactor these in another PR that is already open.
From the recent comments, I think we should just handle this statically and disable it. Like @AkihiroSuda said, users that wish to use containerd for more can use the |
This flag gives users a much easier to way to try containerd/cri and I think it very reasonable that someone running docker may want to try containerd with k8s using the containerd which is already running on their machine. If the question is whether that is an acceptable configuration in production, I am not sure if the cri plugin or 18.06-ce are certified for production kubernetes. |
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.
LGTM wrt having a knob to turn where default is off
This flag seems harmless to me and as @dmcgowan says it allows people to try out cri in a development environment. |
LGTM |
Codecov Report
@@ Coverage Diff @@
## master #37519 +/- ##
==========================================
+ Coverage 34.95% 35.49% +0.53%
==========================================
Files 610 610
Lines 44886 44893 +7
==========================================
+ Hits 15690 15934 +244
+ Misses 27077 26800 -277
- Partials 2119 2159 +40 |
All tests passed except:
which I think is irrelevant. Merging. |
Disable cri plugin by default in containerd and allows an option to enable the plugin. This only
has an effect on containerd when supervised by dockerd. When containerd is managed outside of dockerd, the configuration is not effected.
fixes #37507