1
0
mirror of https://github.com/containers/podman.git synced 2026-02-05 06:45:31 +01:00

Merge pull request #27827 from lsm5/podman6-no-cni

Podman6: Remove CNI
This commit is contained in:
Brent Baude
2026-01-28 10:20:56 -06:00
committed by GitHub
34 changed files with 88 additions and 322 deletions

View File

@@ -164,9 +164,6 @@ func getRuntime(ctx context.Context, fs *flag.FlagSet, opts *engineOpts) (*libpo
if fs.Changed("tmpdir") {
options = append(options, libpod.WithTmpDir(cfg.ContainersConf.Engine.TmpDir))
}
if fs.Changed("network-backend") {
options = append(options, libpod.WithNetworkBackend(cfg.ContainersConf.Network.NetworkBackend))
}
if fs.Changed("events-backend") {
options = append(options, libpod.WithEventsLogger(cfg.ContainersConf.Engine.EventsLogger))
@@ -208,8 +205,6 @@ func getRuntime(ctx context.Context, fs *flag.FlagSet, opts *engineOpts) (*libpo
options = append(options, libpod.WithStaticDir(opts.config.ContainersConfDefaultsRO.Engine.StaticDir))
}
// TODO flag to set CNI plugins dir?
if !opts.withFDS {
options = append(options, libpod.WithEnableSDNotify())
}

View File

@@ -45,7 +45,7 @@ const (
// be joined. loopback should still exist.
// Only used with the network namespace, invalid otherwise.
NoNetwork NamespaceMode = "none"
// Bridge indicates that the network backend (CNI/netavark)
// Bridge indicates that the network backend (netavark)
// should be used.
// Only used with the network namespace, invalid otherwise.
Bridge NamespaceMode = "bridge"

View File

@@ -179,7 +179,7 @@ func parseSplitPort(hostIP, hostPort *string, ctrPort string, protocol *string)
if *hostIP == "" {
return newPort, errors.New("must provide a non-empty container host IP to publish")
} else if *hostIP != "0.0.0.0" {
// If hostIP is 0.0.0.0, leave it unset - CNI treats
// If hostIP is 0.0.0.0, leave it unset - netavark treats
// 0.0.0.0 and empty differently, Docker does not.
testIP := net.ParseIP(*hostIP)
if testIP == nil {
@@ -281,7 +281,6 @@ func CreateExitCommandArgs(storageConfig storageTypes.StoreOptions, config *conf
"--cgroup-manager", config.Engine.CgroupManager,
"--tmpdir", config.Engine.TmpDir,
"--network-config-dir", config.Network.NetworkConfigDir,
"--network-backend", config.Network.NetworkBackend,
"--volumepath", config.Engine.VolumePath,
fmt.Sprintf("--transient-store=%t", storageConfig.TransientStore),
}