Skip to content

Commit

Permalink
Stop using /etc/cni/net.d for podman network
Browse files Browse the repository at this point in the history
Kubernetes can't handle anything else using the same config
directory, and doesn't have a method of choosing which cni.
  • Loading branch information
afbjorklund committed Jun 19, 2021
1 parent 386561f commit c6c9cec
Show file tree
Hide file tree
Showing 2 changed files with 34 additions and 2 deletions.
29 changes: 29 additions & 0 deletions deploy/iso/minikube-iso/package/podman/containers.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
# The containers configuration file specifies all of the available configuration
# command-line options/flags for container engine tools like Podman & Buildah,
# but in a TOML format that can be easily modified and versioned.

# Please refer to containers.conf(5) for details of all configuration options.
# Not all container engines implement all of the options.
# All of the options have hard coded defaults and these options will override
# the built in defaults. Users can then override these options via the command
# line. Container engines will read containers.conf files in up to three
# locations in the following order:
# 1. /usr/share/containers/containers.conf
# 2. /etc/containers/containers.conf
# 3. $HOME/.config/containers/containers.conf (Rootless containers ONLY)
# Items specified in the latter containers.conf, if they exist, override the
# previous containers.conf settings, or the default settings.

[network]

# Path to directory where CNI plugin binaries are located.
#
# cni_plugin_dirs = ["/usr/libexec/cni"]

# The network name of the default CNI network to attach pods to.
# default_network = "podman"

# Path to the directory where CNI configuration files are located.
#
# network_config_dir = "/etc/cni/net.d/"
network_config_dir = "/etc/containers/net.d/"
7 changes: 5 additions & 2 deletions deploy/iso/minikube-iso/package/podman/podman.mk
Original file line number Diff line number Diff line change
Expand Up @@ -47,8 +47,11 @@ endef

define PODMAN_INSTALL_TARGET_CMDS
$(INSTALL) -Dm755 $(@D)/bin/podman $(TARGET_DIR)/usr/bin/podman
$(INSTALL) -d -m 755 $(TARGET_DIR)/etc/cni/net.d/
$(INSTALL) -m 644 $(@D)/cni/87-podman-bridge.conflist $(TARGET_DIR)/etc/cni/net.d/87-podman-bridge.conflist
# Don't use kubernetes /etc/cni, but use podman /etc/containers
$(INSTALL) -d -m 755 $(TARGET_DIR)/etc/containers/
$(INSTALL) -m 644 $(PODMAN_PKGDIR)/containers.conf $(TARGET_DIR)/etc/containers/containers.conf
$(INSTALL) -d -m 755 $(TARGET_DIR)/etc/containers/net.d/
$(INSTALL) -m 644 $(@D)/cni/87-podman-bridge.conflist $(TARGET_DIR)/etc/containers/net.d/87-podman-bridge.conflist
endef

define PODMAN_INSTALL_INIT_SYSTEMD
Expand Down

0 comments on commit c6c9cec

Please sign in to comment.