From fe90a45e0d914723b8c26e4e9497f414312b6af0 Mon Sep 17 00:00:00 2001 From: Paul Holzinger Date: Thu, 11 Nov 2021 16:37:13 +0100 Subject: Add flag to overwrite network backend from config To make testing easier we can overwrite the network backend with the global `--network-backend` option. Signed-off-by: Paul Holzinger --- pkg/domain/infra/runtime_libpod.go | 3 +++ 1 file changed, 3 insertions(+) (limited to 'pkg/domain') diff --git a/pkg/domain/infra/runtime_libpod.go b/pkg/domain/infra/runtime_libpod.go index 7ec6135ee..cfb674b6d 100644 --- a/pkg/domain/infra/runtime_libpod.go +++ b/pkg/domain/infra/runtime_libpod.go @@ -200,6 +200,9 @@ func getRuntime(ctx context.Context, fs *flag.FlagSet, opts *engineOpts) (*libpo if fs.Changed("network-cmd-path") { options = append(options, libpod.WithNetworkCmdPath(cfg.Engine.NetworkCmdPath)) } + if fs.Changed("network-backend") { + options = append(options, libpod.WithNetworkBackend(cfg.Network.NetworkBackend)) + } if fs.Changed("events-backend") { options = append(options, libpod.WithEventsLogger(cfg.Engine.EventsLogger)) -- cgit v1.2.3-54-g00ecf