Skip to content

Commit 4d6ae94

Browse files
authored
Merge pull request #49 from lima-vm/cni-plugins
Add LIMA_INSTALL_CNI_PLUGINS option
2 parents 0ea4398 + 6463913 commit 4d6ae94

File tree

4 files changed

+15
-4
lines changed

4 files changed

+15
-4
lines changed

edition/min

+1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
export LIMA_INSTALL_BINFMT_MISC=false
22
export LIMA_INSTALL_CA_CERTIFICATES=false
33
export LIMA_INSTALL_CLOUD_INIT=false
4+
export LIMA_INSTALL_CNI_PLUGINS=false
45
export LIMA_INSTALL_DOCKER=false
56
export LIMA_INSTALL_K3S=false
67
export LIMA_INSTALL_IPTABLES=false

edition/rd

+1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
source edition/min
22
LIMA_INSTALL_BINFMT_MISC=true
33
LIMA_INSTALL_CA_CERTIFICATES=true
4+
LIMA_INSTALL_CNI_PLUGINS=true
45
LIMA_INSTALL_DOCKER=true
56
LIMA_INSTALL_IPTABLES=true
67
LIMA_INSTALL_LIMA_INIT=true

genapkovl-lima.sh

+10-4
Original file line numberDiff line numberDiff line change
@@ -199,6 +199,10 @@ if [ "${LIMA_INSTALL_CA_CERTIFICATES}" == "true" ]; then
199199
echo "ca-certificates" >> "$tmp"/etc/apk/world
200200
fi
201201

202+
if [ "${LIMA_INSTALL_CNI_PLUGINS}" == "true" ]; then
203+
echo "cni-plugins" >> "$tmp"/etc/apk/world
204+
fi
205+
202206
if [ "${LIMA_INSTALL_K3S}" == "true" ]; then
203207
echo "k3s" >> "$tmp"/etc/apk/world
204208
rc_add k3s default
@@ -221,10 +225,12 @@ if [ "${LIMA_INSTALL_NERDCTL}" == "true" ]; then
221225
cp "${tmp}/nerdctl/bin/${bin}" "${tmp}/usr/local/bin/${bin}"
222226
chmod u+s "${tmp}/usr/local/bin/${bin}"
223227
done
224-
mkdir -p "${tmp}/usr/local/libexec/cni"
225-
for plugin in bridge portmap firewall tuning isolation host-local; do
226-
cp "${tmp}/nerdctl/libexec/cni/${plugin}" "${tmp}/usr/local/libexec/cni/${plugin}"
227-
done
228+
if [ "${LIMA_INSTALL_CNI_PLUGINS}" != "true" ]; then
229+
mkdir -p "${tmp}/usr/local/libexec/cni"
230+
for plugin in bridge portmap firewall tuning isolation host-local; do
231+
cp "${tmp}/nerdctl/libexec/cni/${plugin}" "${tmp}/usr/local/libexec/cni/${plugin}"
232+
done
233+
fi
228234
fi
229235

230236
if [ "${LIMA_INSTALL_SSHFS}" == "true" ]; then

mkimg.lima.sh

+3
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,9 @@ profile_lima() {
2020
if [ "${LIMA_INSTALL_CLOUD_INIT}" == "true" ]; then
2121
apks="$apks cloud-init"
2222
fi
23+
if [ "${LIMA_INSTALL_CNI_PLUGINS}" == "true" ]; then
24+
apks="$apks cni-plugins"
25+
fi
2326
if [ "${LIMA_INSTALL_DOCKER}" == "true" ]; then
2427
apks="$apks libseccomp runc containerd tini-static device-mapper-libs"
2528
apks="$apks docker-engine docker-openrc docker-cli docker"

0 commit comments

Comments
 (0)