-
Notifications
You must be signed in to change notification settings - Fork 3.8k
Run CRI services as containerd plugins #9119
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
Conversation
|
Skipping CI for Draft Pull Request. |
|
/test all |
| criBase := criBasePlugin.(*base.CRIBase) | ||
|
|
||
| // Get image service. | ||
| criImagePlugin, err := ic.GetByID(plugin.GRPCPlugin, "cri-image-service") |
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 not a safe dependency. I'm trying to carve out the client dependency and image service. If we define the interface needed here, we can probably break this out cleaner.
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.
Briefly synced offline
I don't think there is a clean way to define these dependencies without reworking plugin/ package (or without breaking changes in configuration). Do you want to postpone this PR until we figure something out or its fine to leave a TODO for follow up work and move on with further decoupling?
e601dbc to
cd74f65
Compare
Signed-off-by: Maksym Pavlenko <pavlenko.maksym@gmail.com>
|
|
||
| // Base plugin that other CRI services depend on. | ||
| plugin.Register(&plugin.Registration{ | ||
| Type: plugin.GRPCPlugin, |
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.
It seems plugin.GRPCPlugin should implements a grpc interface, but CRIBase does not.
| Requires: []plugin.Type{ | ||
| plugin.EventPlugin, | ||
| plugin.ServicePlugin, | ||
| plugin.NRIApiPlugin, |
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.
It seems NRIAPI is depended by cri-runtime-service only, shall we move the requirements to there?
|
Can I cherry-pick this commit to move on the work to split the cri plugins and make a clean podsandbox plugin? |
It seems Runtime CRI service should depends on Pod sandbox service as one of it's sandbox controller. |
|
Closing this for now. |
This PR refactors CRI service to run image service, runtime service, and pod sandbox controller as containerd plugins (previously these were instantiated manually). The former one is a prerequisite for work happening in #8268.
This change introduces
cri-baseinternal plugin to maintain common dependencies between CRI (config, stores, etc) services. Higher level GRPC plugins add it as a dependency.❯ sudo ./bin/ctr plugins ls | grep cri io.containerd.internal.v1 cri-base darwin/arm64/v8 ok io.containerd.grpc.v1 cri-image-service - ok io.containerd.grpc.v1 cri-runtime-service - ok io.containerd.grpc.v1 cri-podsandbox-controller - okDependencies: