summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatthew Heon <matthew.heon@gmail.com>2018-09-11 10:52:38 -0400
committerAtomic Bot <atomic-devel@projectatomic.io>2018-09-12 19:18:24 +0000
commit6e263fed350b2471c03329edae65e38286043840 (patch)
treeaf1dfadfb905f2d8795ac3faf0a66b3b7c939863
parentd9580ec62b716d7c8e861dd27c4b452f2419eb65 (diff)
downloadpodman-6e263fed350b2471c03329edae65e38286043840.tar.gz
podman-6e263fed350b2471c03329edae65e38286043840.tar.bz2
podman-6e263fed350b2471c03329edae65e38286043840.zip
Explicitly set default CNI network name in libpod.conf
Signed-off-by: Matthew Heon <matthew.heon@gmail.com> Closes: #1438 Approved by: TomSweeneyRedHat
-rw-r--r--libpod.conf9
-rw-r--r--libpod/runtime.go4
2 files changed, 11 insertions, 2 deletions
diff --git a/libpod.conf b/libpod.conf
index 9de42caf2..cc4a10cff 100644
--- a/libpod.conf
+++ b/libpod.conf
@@ -58,6 +58,15 @@ cni_plugin_dir = [
"/opt/cni/bin"
]
+# Default CNI network for libpod.
+# If multiple CNI network configs are present, libpod will use the network with
+# the name given here for containers unless explicitly overridden.
+# The default here is set to the name we set in the
+# 87-podman-bridge.conflist included in the repository.
+# Not setting this, or setting it to the empty string, will use normal CNI
+# precedence rules for selecting between multiple networks.
+cni_default_network = "podman"
+
# Default libpod namespace
# If libpod is joined to a namespace, it will see only containers and pods
# that were created in the same namespace, and will create new containers and
diff --git a/libpod/runtime.go b/libpod/runtime.go
index 8dc561cd8..63b8c971e 100644
--- a/libpod/runtime.go
+++ b/libpod/runtime.go
@@ -139,11 +139,11 @@ type RuntimeConfig struct {
// CNIPluginDir sets a number of directories where the CNI network
// plugins can be located
CNIPluginDir []string `toml:"cni_plugin_dir"`
- // HooksDir Path to the directory containing hooks configuration files
- HooksDir string `toml:"hooks_dir"`
// CNIDefaultNetwork is the network name of the default CNI network
// to attach pods to
CNIDefaultNetwork string `toml:"cni_default_network,omitempty"`
+ // HooksDir Path to the directory containing hooks configuration files
+ HooksDir string `toml:"hooks_dir"`
// HooksDirNotExistFatal switches between fatal errors and non-fatal
// warnings if the configured HooksDir does not exist.
HooksDirNotExistFatal bool `toml:"hooks_dir_not_exist_fatal"`