Provide ability to set lo up without CNI

Signed-off-by: Michael Zappa <michael.zappa@gmail.com>
This commit is contained in:
Michael Zappa
2024-05-16 09:31:38 -06:00
parent a673c3452a
commit 332caf1a15
9 changed files with 107 additions and 8 deletions

View File

@@ -455,7 +455,12 @@ func (c *criService) setupPodNetwork(ctx context.Context, sandbox *sandboxstore.
if netPlugin == nil {
return errors.New("cni config not initialized")
}
if c.config.UseInternalLoopback {
err := c.bringUpLoopback(path)
if err != nil {
return fmt.Errorf("unable to set lo to up: %w", err)
}
}
opts, err := cniNamespaceOpts(id, config)
if err != nil {
return fmt.Errorf("get cni namespace options: %w", err)