FIXUP #2424: local_provisioner directory should be created only if enabled
This commit is contained in:
parent
955f833120
commit
6402004018
5 changed files with 4 additions and 12 deletions
|
@ -171,8 +171,8 @@ registry_enabled: false
|
||||||
# Local volume provisioner deployment
|
# Local volume provisioner deployment
|
||||||
local_volume_provisioner_enabled: false
|
local_volume_provisioner_enabled: false
|
||||||
# local_volume_provisioner_namespace: "{{ system_namespace }}"
|
# local_volume_provisioner_namespace: "{{ system_namespace }}"
|
||||||
local_volume_provisioner_base_dir: /mnt/disks
|
# local_volume_provisioner_base_dir: /mnt/disks
|
||||||
local_volume_provisioner_mount_dir: /mnt/disks
|
# local_volume_provisioner_mount_dir: /mnt/disks
|
||||||
# local_volume_provisioner_storage_class: local-storage
|
# local_volume_provisioner_storage_class: local-storage
|
||||||
|
|
||||||
# CephFS provisioner deployment
|
# CephFS provisioner deployment
|
||||||
|
|
|
@ -3,3 +3,5 @@ apiVersion: v1
|
||||||
kind: Namespace
|
kind: Namespace
|
||||||
metadata:
|
metadata:
|
||||||
name: {{ local_volume_provisioner_namespace }}
|
name: {{ local_volume_provisioner_namespace }}
|
||||||
|
labels:
|
||||||
|
name: {{ local_volume_provisioner_namespace }}
|
||||||
|
|
|
@ -26,9 +26,6 @@
|
||||||
-v /var/run:/var/run:rw \
|
-v /var/run:/var/run:rw \
|
||||||
-v {{kube_config_dir}}:{{kube_config_dir}}:ro \
|
-v {{kube_config_dir}}:{{kube_config_dir}}:ro \
|
||||||
-v /etc/os-release:/etc/os-release:ro \
|
-v /etc/os-release:/etc/os-release:ro \
|
||||||
{% if local_volume_provisioner_enabled == true %}
|
|
||||||
-v {{ local_volume_provisioner_base_dir }}:{{ local_volume_provisioner_base_dir }}:shared \
|
|
||||||
{% endif %}
|
|
||||||
{{ hyperkube_image_repo }}:{{ hyperkube_image_tag}} \
|
{{ hyperkube_image_repo }}:{{ hyperkube_image_tag}} \
|
||||||
./hyperkube kubelet \
|
./hyperkube kubelet \
|
||||||
"$@"
|
"$@"
|
||||||
|
|
|
@ -36,9 +36,6 @@ ExecStart=/usr/bin/rkt run \
|
||||||
--volume var-lib-docker,kind=host,source={{ docker_daemon_graph }},readOnly=false \
|
--volume var-lib-docker,kind=host,source={{ docker_daemon_graph }},readOnly=false \
|
||||||
--volume var-lib-kubelet,kind=host,source=/var/lib/kubelet,readOnly=false,recursive=true \
|
--volume var-lib-kubelet,kind=host,source=/var/lib/kubelet,readOnly=false,recursive=true \
|
||||||
--volume var-log,kind=host,source=/var/log \
|
--volume var-log,kind=host,source=/var/log \
|
||||||
{% if local_volume_provisioner_enabled == true %}
|
|
||||||
--volume local-volume-provisioner-base-dir,kind=host,source={{ local_volume_provisioner_base_dir }},readOnly=false,recursive=true \
|
|
||||||
{% endif %}
|
|
||||||
{% if kube_network_plugin in ["calico", "weave", "canal", "flannel", "contiv", "cilium"] %}
|
{% if kube_network_plugin in ["calico", "weave", "canal", "flannel", "contiv", "cilium"] %}
|
||||||
--volume etc-cni,kind=host,source=/etc/cni,readOnly=true \
|
--volume etc-cni,kind=host,source=/etc/cni,readOnly=true \
|
||||||
--volume opt-cni,kind=host,source=/opt/cni,readOnly=true \
|
--volume opt-cni,kind=host,source=/opt/cni,readOnly=true \
|
||||||
|
@ -67,9 +64,6 @@ ExecStart=/usr/bin/rkt run \
|
||||||
--mount volume=var-lib-kubelet,target=/var/lib/kubelet \
|
--mount volume=var-lib-kubelet,target=/var/lib/kubelet \
|
||||||
--mount volume=var-log,target=/var/log \
|
--mount volume=var-log,target=/var/log \
|
||||||
--mount volume=hosts,target=/etc/hosts \
|
--mount volume=hosts,target=/etc/hosts \
|
||||||
{% if local_volume_provisioner_enabled == true %}
|
|
||||||
--mount volume=local-volume-provisioner-base-dir,target={{ local_volume_provisioner_base_dir }} \
|
|
||||||
{% endif %}
|
|
||||||
{% if kubelet_flexvolumes_plugins_dir is defined %}
|
{% if kubelet_flexvolumes_plugins_dir is defined %}
|
||||||
--mount volume=flexvolumes,target={{ kubelet_flexvolumes_plugins_dir }} \
|
--mount volume=flexvolumes,target={{ kubelet_flexvolumes_plugins_dir }} \
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
|
@ -60,7 +60,6 @@
|
||||||
- "{{ kube_config_dir }}/ssl"
|
- "{{ kube_config_dir }}/ssl"
|
||||||
- "{{ kube_manifest_dir }}"
|
- "{{ kube_manifest_dir }}"
|
||||||
- "{{ kube_script_dir }}"
|
- "{{ kube_script_dir }}"
|
||||||
- "{{ local_volume_provisioner_base_dir }}"
|
|
||||||
|
|
||||||
- name: check cloud_provider value
|
- name: check cloud_provider value
|
||||||
fail:
|
fail:
|
||||||
|
|
Loading…
Reference in a new issue