Set cloud provider on compute nodes for kubelet

Related bug: PROD:25973

Change-Id: I315bf19a9d5c84ff1884d5d5bffcca010a0007bc
diff --git a/kubernetes/files/dockershim/default.pool b/kubernetes/files/dockershim/default.pool
index 5c47d35..4cb0a5c 100644
--- a/kubernetes/files/dockershim/default.pool
+++ b/kubernetes/files/dockershim/default.pool
@@ -31,12 +31,10 @@
 --network-plugin=cni \
 --cni-bin-dir={{ pool.apiserver.get('cni_bin_dir', '/opt/cni/bin') }} \
 --file-check-frequency={{ pool.kubelet.frequency }} \
-{%- if common.get('cloudprovider', {}).get('enabled') %}
---cloud-provider=external \
-{%- if common.get('cloudprovider', {}).get('provider') == 'openstack' %}
+{%- if common.get('cloudprovider', {}).get('enabled') and common.get('cloudprovider', {}).get('provider') == 'openstack' %}
+--cloud-provider=openstack \
 --cloud-config=/etc/kubernetes/cloud-config \
 {%- endif %}
-{%- endif %}
 --enable-controller-attach-detach={{ pool.get('enable-controller-attach-detach', 'false') }} \
 {%- for key, value in pool.get('kubelet', {}).get('daemon_opts', {}).items() %}
 --{{ key }}={{ value }} \
diff --git a/kubernetes/files/kubelet/default.pool b/kubernetes/files/kubelet/default.pool
index 6e42d36..8e2a1e9 100644
--- a/kubernetes/files/kubelet/default.pool
+++ b/kubernetes/files/kubelet/default.pool
@@ -55,12 +55,10 @@
 --cni-bin-dir={{ pool.apiserver.get('cni_bin_dir', '/opt/cni/bin') }} \
 {%- endif %}
 --file-check-frequency={{ pool.kubelet.frequency }} \
-{%- if common.get('cloudprovider', {}).get('enabled') %}
---cloud-provider=external \
-{%- if common.get('cloudprovider', {}).get('provider') == 'openstack' %}
+{%- if common.get('cloudprovider', {}).get('enabled') and common.get('cloudprovider', {}).get('provider') == 'openstack' %}
+--cloud-provider=openstack \
 --cloud-config=/etc/kubernetes/cloud-config \
 {%- endif %}
-{%- endif %}
 {%- if common.addons.get('virtlet', {}).get('enabled') %}
 --container-runtime={{ pool.get('container-runtime', 'remote') }} \
 {%- if salt['pkg.version_cmp'](version,'1.7') < 0 %}