mirror of
https://github.com/linuxkit/linuxkit.git
synced 2025-10-07 23:16:49 +00:00
For the time being I've decided to exploit shared mounts to make `/opt/cni` and `/etc/cni` work as expected. We need these directories to appear writable on the host, and allow Weave Net pod to bind-mount out them in order to install plugin binaries, and allow for vanilla CNI plugins to be also accessible to kubelet. Signed-off-by: Ilya Dmitrichenko <errordeveloper@gmail.com>
16 lines
469 B
Ruby
16 lines
469 B
Ruby
import 'common.rb'
|
|
|
|
from "mobylinux/mount:d2669e7c8ddda99fa0618a414d44261eba6e299a"
|
|
|
|
script = [
|
|
mount_bind_hostns_self("/etc/cni"), mount_make_hostns_rshared("/etc/cni"),
|
|
mount_bind_hostns_self("/opt/cni"), mount_make_hostns_rshared("/opt/cni"),
|
|
mount_persistent_disk("/var/lib"),
|
|
mkdir_p("/var/lib/kubeadm"),
|
|
]
|
|
|
|
create_shell_wrapper script.join(' && '), '/usr/bin/kube-mounts.sh'
|
|
set_exec cmd: [ '/usr/bin/kube-mounts.sh' ]
|
|
|
|
tag "#{@image_name}:latest-mounts"
|