From 72e8efccc918e87e5e202bfbbcbdcf31707963c3 Mon Sep 17 00:00:00 2001 From: Matthew Heon Date: Thu, 7 Dec 2017 15:37:51 -0500 Subject: Fix Travis tests Signed-off-by: Matthew Heon Closes: #109 Approved by: mheon --- cmd/kpod/common.go | 5 ++++- cmd/kpod/main.go | 4 ++++ 2 files changed, 8 insertions(+), 1 deletion(-) (limited to 'cmd') diff --git a/cmd/kpod/common.go b/cmd/kpod/common.go index 339f56fdd..774215479 100644 --- a/cmd/kpod/common.go +++ b/cmd/kpod/common.go @@ -50,7 +50,7 @@ func getRuntime(c *cli.Context) (*libpod.Runtime, error) { options.GraphDriverName = config.Storage options.GraphDriverOptions = config.StorageOptions - return libpod.NewRuntime(libpod.WithStorageConfig(options), libpod.WithConmonPath(config.Conmon), libpod.WithOCIRuntime(config.Runtime)) + return libpod.NewRuntime(libpod.WithStorageConfig(options), libpod.WithConmonPath(config.Conmon), libpod.WithOCIRuntime(config.Runtime), libpod.WithCNIDirs(config.NetworkDir, config.PluginDir)) } func shutdownStores() { @@ -98,6 +98,9 @@ func getConfig(c *cli.Context) (*libkpod.Config, error) { if c.GlobalIsSet("runtime") { config.Runtime = c.GlobalString("runtime") } + if c.GlobalIsSet("cni-config-dir") { + config.NetworkDir = c.GlobalString("cni-config-dir") + } return config, nil } diff --git a/cmd/kpod/main.go b/cmd/kpod/main.go index 90a4d1d7f..a2a81c8b6 100644 --- a/cmd/kpod/main.go +++ b/cmd/kpod/main.go @@ -108,6 +108,10 @@ func main() { os.Exit(code) } app.Flags = []cli.Flag{ + cli.StringFlag{ + Name: "cni-config-dir", + Usage: "path of the configuration directory for CNI networks", + }, cli.StringFlag{ Name: "config, c", Usage: "path of a config file detailing container server configuration options", -- cgit v1.2.3-54-g00ecf