diff --git a/roles/kubernetes-apps/local_volume_provisioner/templates/configmap.yml.j2 b/roles/kubernetes-apps/local_volume_provisioner/templates/configmap.yml.j2 index fc6d829a88bc53e7a5ce8a1ed6e363e3ba11bd03..aa8476fd4394787cfc8d813983f7bb2ce26812b5 100644 --- a/roles/kubernetes-apps/local_volume_provisioner/templates/configmap.yml.j2 +++ b/roles/kubernetes-apps/local_volume_provisioner/templates/configmap.yml.j2 @@ -10,5 +10,5 @@ data: "local-storage": | { "hostDir": "{{ local_volume_base_dir }}", - "mountDir": "/mnt/local-storage/" + "mountDir": "{{ local_volume_mount_dir }}" } diff --git a/roles/kubernetes-apps/local_volume_provisioner/templates/daemonset.yml.j2 b/roles/kubernetes-apps/local_volume_provisioner/templates/daemonset.yml.j2 index 401bce4a5621a02e5ae7709df851abb9daa48f1e..d4f8b73ea0eedd059a87bbe1ad76c59e6cf90eec 100644 --- a/roles/kubernetes-apps/local_volume_provisioner/templates/daemonset.yml.j2 +++ b/roles/kubernetes-apps/local_volume_provisioner/templates/daemonset.yml.j2 @@ -18,7 +18,7 @@ spec: privileged: true volumeMounts: - name: discovery-vol - mountPath: "/local-disks" + mountPath: "/{{ local_volume_mount_dir }}" - name: local-volume-config mountPath: /etc/provisioner/config/ env: diff --git a/roles/kubespray-defaults/defaults/main.yaml b/roles/kubespray-defaults/defaults/main.yaml index fd13417eb4a56a6b25b7208d09341e2058baf539..0f4cc90ce1d498080ea2e0bf4b0664b710e49beb 100644 --- a/roles/kubespray-defaults/defaults/main.yaml +++ b/roles/kubespray-defaults/defaults/main.yaml @@ -169,6 +169,7 @@ persistent_volumes_enabled: false # Base path for local volume provisioner addon local_volume_base_dir: /mnt/disks +local_volume_mount_dir: /local-disks ## When OpenStack is used, Cinder version can be explicitly specified if autodetection fails (Fixed in 1.9: https://github.com/kubernetes/kubernetes/issues/50461) # openstack_blockstorage_version: "v1/v2/auto (default)"