Skip to content

Commit 50c81be

Browse files
committed
Stop using /etc/cni/net.d for podman network
Kubernetes can't handle anything else using the same config directory, and doesn't have a method of choosing which cni.
1 parent 386561f commit 50c81be

File tree

2 files changed

+34
-2
lines changed

2 files changed

+34
-2
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
# The containers configuration file specifies all of the available configuration
2+
# command-line options/flags for container engine tools like Podman & Buildah,
3+
# but in a TOML format that can be easily modified and versioned.
4+
5+
# Please refer to containers.conf(5) for details of all configuration options.
6+
# Not all container engines implement all of the options.
7+
# All of the options have hard coded defaults and these options will override
8+
# the built in defaults. Users can then override these options via the command
9+
# line. Container engines will read containers.conf files in up to three
10+
# locations in the following order:
11+
# 1. /usr/share/containers/containers.conf
12+
# 2. /etc/containers/containers.conf
13+
# 3. $HOME/.config/containers/containers.conf (Rootless containers ONLY)
14+
# Items specified in the latter containers.conf, if they exist, override the
15+
# previous containers.conf settings, or the default settings.
16+
17+
[network]
18+
19+
# Path to directory where CNI plugin binaries are located.
20+
#
21+
# cni_plugin_dirs = ["/usr/libexec/cni"]
22+
23+
# The network name of the default CNI network to attach pods to.
24+
# default_network = "podman"
25+
26+
# Path to the directory where CNI configuration files are located.
27+
#
28+
# network_config_dir = "/etc/cni/net.d/"
29+
network_config_dir = "/etc/containers/net.d/"

deploy/iso/minikube-iso/package/podman/podman.mk

+5-2
Original file line numberDiff line numberDiff line change
@@ -47,8 +47,11 @@ endef
4747

4848
define PODMAN_INSTALL_TARGET_CMDS
4949
$(INSTALL) -Dm755 $(@D)/bin/podman $(TARGET_DIR)/usr/bin/podman
50-
$(INSTALL) -d -m 755 $(TARGET_DIR)/etc/cni/net.d/
51-
$(INSTALL) -m 644 $(@D)/cni/87-podman-bridge.conflist $(TARGET_DIR)/etc/cni/net.d/87-podman-bridge.conflist
50+
# Don't use kubernetes /etc/cni, but use podman /etc/containers
51+
$(INSTALL) -d -m 755 $(TARGET_DIR)/etc/containers/
52+
$(INSTALL) -m 644 $(@D)/containers.conf $(TARGET_DIR)/etc//net.d/87-podman-bridge.conflist
53+
$(INSTALL) -d -m 755 $(TARGET_DIR)/etc/containers/net.d/
54+
$(INSTALL) -m 644 $(@D)/cni/87-podman-bridge.conflist $(TARGET_DIR)/etc/containers/net.d/87-podman-bridge.conflist
5255
endef
5356

5457
define PODMAN_INSTALL_INIT_SYSTEMD

0 commit comments

Comments
 (0)