sandbox: make podsandbox controller plugin type of PodSandboxPlugin
We add a new plugin type SandboxControllerPluginV2 to distinguish it with the podsandbox controller. We can not handle the task in the pod sandbox as a sandboxed Task because podsandbox controller rely on task plugin to create pause container, If the task handle rely on podsandbox controller, it will make a cyclic dependency of plugins.
So In this PR, We add a new SandboxControllerPluginV2, the Shim sandbox controller and other user defined sandbox controllers should be in this kind. and the subsequent PR of sandboxed Task will rely on this PR to handle sandboxed Task in sandbox of SandboxControllerPluginV2.
Hi @abel-von. Thanks for your PR.
I'm waiting for a containerd member to verify that this patch is reasonable to test. If it is, they should reply with /ok-to-test on its own line. Until that is done, I will not automatically test new commits in this PR, but the usual testing commands by org members will still work. Regular contributors should join the org to skip this step.
Once the patch is verified, the new status will be reflected by the ok-to-test label.
I understand the commands that are listed here.
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.
There is no legacy podsandbox controller. Sandbox api was introduced in 1.7 as experimental API with no backward compatibility guaranties until its stable. It's perfectly legal to break things until 2.0 release.
It is just the podsandbox controller is a little bit special because it manage sandbox by Task plugin. and in https://github.com/containerd/containerd/pull/9884 the sandboxed Task may have dependency on the sandbox controller to update the sandbox before/after task manangement, this makes a cyclic dependency.
We add a v2 sandbox controller to distinguish it with the podsandbox controller, so we can exclude it from the sandboxed Task dependency.
In the last community meeting I proposed another solution, we can add a ReqiureExcludes in the plugin definition to exclude the podsandbox controller from the Requires
I am not sure which is a better solution, may you have a better suggestion, please? @mxpv
/ok-to-test
Shell we add this in 2.0 milestone list? @mxpv @fuweid
/retest
/retest
@mxpv could you please take a look?
Please take a look at this PR while you have time. @mxpv @dmcgowan @fuweid
/cc @mxpv @dmcgowan @fuweid
@mxpv Could you please take a look at this PR again? I realized that the change of plugin name may related to the change of config and config migration. Maybe we don't have to consider the compatibility issue, if we can merge it before 2.0.