adding mount for kubelet to enable rbd mounts (#1957)

* adding mount for kubelet to enable rbd mounts

* fix conditionnal variable name
This commit is contained in:
neith00 2017-11-13 15:04:13 +01:00 committed by Matthew Mosesohn
parent 037edf1215
commit 5f39efcdfd

View file

@ -15,6 +15,10 @@ ExecStartPre=-/bin/mkdir -p /var/lib/kubelet
EnvironmentFile={{kube_config_dir}}/kubelet.env
# stage1-fly mounts /proc /sys /dev so no need to duplicate the mounts
ExecStart=/usr/bin/rkt run \
{% if kubelet_load_modules == true %}
--volume modprobe,kind=host,source=/usr/sbin/modprobe \
--volume lib-modules,kind=host,source=/lib/modules \
{% endif %}
--volume os-release,kind=host,source=/etc/os-release,readOnly=true \
--volume hosts,kind=host,source=/etc/hosts,readOnly=true \
--volume dns,kind=host,source=/etc/resolv.conf \
@ -35,6 +39,10 @@ ExecStart=/usr/bin/rkt run \
--volume etc-cni,kind=host,source=/etc/cni,readOnly=true \
--volume opt-cni,kind=host,source=/opt/cni,readOnly=true \
--volume var-lib-cni,kind=host,source=/var/lib/cni,readOnly=false \
{% if kubelet_load_modules == true %}
--mount volume=modprobe,target=/usr/sbin/modprobe \
--mount volume=lib-modules,target=/lib/modules \
{% endif %}
--mount volume=etc-cni,target=/etc/cni \
--mount volume=opt-cni,target=/opt/cni \
--mount volume=var-lib-cni,target=/var/lib/cni \