sandbox: podsandbox init its own client

To break the cyclic dependency of cri plugin and podsandbox plugin,
we define a new plugin type of SandboxesServicePlugin and when cri init
it's own client, it will add the all the controllers by get them from
the SandboxesServicePlugin.
when podsandbox controller init it's client, it will not Require the
SandboxesServicePlugin.

Signed-off-by: Abel Feng <fshb1988@gmail.com>
This commit is contained in:
Abel Feng
2023-10-19 21:06:18 +08:00
parent 7deb68fbf4
commit 0cf48bab2c
8 changed files with 39 additions and 16 deletions

View File

@@ -720,7 +720,6 @@ func (c *Client) SandboxStore() sandbox.Store {
// SandboxController returns the underlying sandbox controller client
func (c *Client) SandboxController(name string) sandbox.Controller {
// default sandboxer is shim
if c.sandboxers != nil {
return c.sandboxers[name]
}