Browse Source

Fix vol format for local volume provisioner in rkt (#2698)

pull/2681/merge
Matthew Mosesohn 6 years ago
committed by GitHub
parent
commit
1a14f1ecc1
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 6 additions and 8 deletions
  1. 14
      roles/kubernetes/node/templates/kubelet.rkt.service.j2

14
roles/kubernetes/node/templates/kubelet.rkt.service.j2

@ -42,15 +42,14 @@ ExecStart=/usr/bin/rkt run \
{# surely there's a better way to do this #} {# surely there's a better way to do this #}
{% if '/var/lib/kubelet' not in kubelet_flexvolumes_plugins_dir %} {% if '/var/lib/kubelet' not in kubelet_flexvolumes_plugins_dir %}
--volume flexvolumes,kind=host,source={{ kubelet_flexvolumes_plugins_dir }},readOnly=false \ --volume flexvolumes,kind=host,source={{ kubelet_flexvolumes_plugins_dir }},readOnly=false \
{% endif %}
{% endif -%}
{% if local_volume_provisioner_enabled %} {% if local_volume_provisioner_enabled %}
--volume local_volume_provisioner_base_dir,kind=host,source={{ local_volume_provisioner_base_dir }},readOnly=false \
--volume local-volume-provisioner-base-dir,kind=host,source={{ local_volume_provisioner_base_dir }},readOnly=false \
{# Not pretty, but needed to avoid double mount #} {# Not pretty, but needed to avoid double mount #}
{% if local_volume_provisioner_base_dir not in local_volume_provisioner_mount_dir and local_volume_provisioner_mount_dir not in local_volume_provisioner_base_dir %} {% if local_volume_provisioner_base_dir not in local_volume_provisioner_mount_dir and local_volume_provisioner_mount_dir not in local_volume_provisioner_base_dir %}
--volume local_volume_provisioner_mount_dir,kind=host,source={{ local_volume_provisioner_mount_dir }},readOnly=false \
--volume local-volume-provisioner-mount-dir,kind=host,source={{ local_volume_provisioner_mount_dir }},readOnly=false \
{% endif %} {% endif %}
{% endif %} {% endif %}
{% if kubelet_load_modules == true %} {% if kubelet_load_modules == true %}
--mount volume=modprobe,target=/usr/sbin/modprobe \ --mount volume=modprobe,target=/usr/sbin/modprobe \
--mount volume=lib-modules,target=/lib/modules \ --mount volume=lib-modules,target=/lib/modules \
@ -76,15 +75,14 @@ ExecStart=/usr/bin/rkt run \
{# surely there's a better way to do this #} {# surely there's a better way to do this #}
{% if '/var/lib/kubelet' not in kubelet_flexvolumes_plugins_dir %} {% if '/var/lib/kubelet' not in kubelet_flexvolumes_plugins_dir %}
--mount volume=flexvolumes,target={{ kubelet_flexvolumes_plugins_dir }} \ --mount volume=flexvolumes,target={{ kubelet_flexvolumes_plugins_dir }} \
{% endif %}
{% endif -%}
{% if local_volume_provisioner_enabled %} {% if local_volume_provisioner_enabled %}
--mount local_volume_provisioner_base_dir,target={{ local_volume_provisioner_base_dir }} \
--mount volume=local-volume-provisioner-base-dir,target={{ local_volume_provisioner_base_dir }} \
{# Not pretty, but needed to avoid double mount #} {# Not pretty, but needed to avoid double mount #}
{% if local_volume_provisioner_base_dir not in local_volume_provisioner_mount_dir and local_volume_provisioner_mount_dir not in local_volume_provisioner_base_dir %} {% if local_volume_provisioner_base_dir not in local_volume_provisioner_mount_dir and local_volume_provisioner_mount_dir not in local_volume_provisioner_base_dir %}
--volume local_volume_provisioner_mount_dir,target={{ local_volume_provisioner_mount_dir }} \
--mount volume=local-volume-provisioner-mount-dir,target={{ local_volume_provisioner_mount_dir }} \
{% endif %} {% endif %}
{% endif %} {% endif %}
--stage1-from-dir=stage1-fly.aci \ --stage1-from-dir=stage1-fly.aci \
{% if kube_hyperkube_image_repo == "docker" %} {% if kube_hyperkube_image_repo == "docker" %}
--insecure-options=image \ --insecure-options=image \

Loading…
Cancel
Save