From 03dff09b8a4aac456192ac5912d3dfb4eded1d92 Mon Sep 17 00:00:00 2001 From: w33dw0r7d Date: Fri, 11 Sep 2020 10:34:14 +0300 Subject: [PATCH] fix kubelet_flexvolumes_plugins_dir undefined (#6645) --- .../external-openstack-cloud-controller-manager-ds.yml.j2 | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/roles/kubernetes-apps/external_cloud_controller/openstack/templates/external-openstack-cloud-controller-manager-ds.yml.j2 b/roles/kubernetes-apps/external_cloud_controller/openstack/templates/external-openstack-cloud-controller-manager-ds.yml.j2 index 63459432c..b30222dab 100644 --- a/roles/kubernetes-apps/external_cloud_controller/openstack/templates/external-openstack-cloud-controller-manager-ds.yml.j2 +++ b/roles/kubernetes-apps/external_cloud_controller/openstack/templates/external-openstack-cloud-controller-manager-ds.yml.j2 @@ -59,8 +59,10 @@ spec: name: openstack-cacert readOnly: true {% endif %} +{% if kubelet_flexvolumes_plugins_dir is defined %} - mountPath: /usr/libexec/kubernetes/kubelet-plugins/volume/exec name: flexvolume-dir +{% endif %} resources: requests: cpu: 200m @@ -69,10 +71,12 @@ spec: value: /etc/config/cloud.conf hostNetwork: true volumes: +{% if kubelet_flexvolumes_plugins_dir is defined %} - hostPath: path: "{{ kubelet_flexvolumes_plugins_dir }}" type: DirectoryOrCreate name: flexvolume-dir +{% endif %} - hostPath: path: /etc/kubernetes/pki type: DirectoryOrCreate