From f325d13082868f6d43f8f047334775d56da43148 Mon Sep 17 00:00:00 2001 From: Phill Garrett Date: Fri, 24 Aug 2018 14:26:41 +0100 Subject: [PATCH 1/2] Add azure-container-registry-config for Azure Seperated out KUBELET_CLOUDPROVIDER env var assignment when cloud_provider equals azure Appended azure-container-registry-config parameter --- roles/kubernetes/node/templates/kubelet.standard.env.j2 | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/roles/kubernetes/node/templates/kubelet.standard.env.j2 b/roles/kubernetes/node/templates/kubelet.standard.env.j2 index c99194ba9..e90a6e3bd 100644 --- a/roles/kubernetes/node/templates/kubelet.standard.env.j2 +++ b/roles/kubernetes/node/templates/kubelet.standard.env.j2 @@ -115,8 +115,10 @@ KUBELET_VOLUME_PLUGIN="--volume-plugin-dir={{ kubelet_flexvolumes_plugins_dir }} # Should this cluster be allowed to run privileged docker containers KUBE_ALLOW_PRIV="--allow-privileged=true" -{% if cloud_provider is defined and cloud_provider in ["openstack", "azure", "vsphere"] %} +{% if cloud_provider is defined and cloud_provider in ["openstack", "vsphere"] %} KUBELET_CLOUDPROVIDER="--cloud-provider={{ cloud_provider }} --cloud-config={{ kube_config_dir }}/cloud_config" +{% if cloud_provider is defined and cloud_provider in ["azure"] %} +KUBELET_CLOUDPROVIDER="--cloud-provider={{ cloud_provider }} --cloud-config={{ kube_config_dir }}/cloud_config --azure-container-registry-config={{ kube_config_dir }}/cloud_config" {% elif cloud_provider is defined and cloud_provider in ["aws", "external"] %} KUBELET_CLOUDPROVIDER="--cloud-provider={{ cloud_provider }}" {% elif cloud_provider is defined and cloud_provider == "oci" %} From 1babbcca856973e5a707c5e378d818d98e6cca7e Mon Sep 17 00:00:00 2001 From: Phill Garrett Date: Tue, 28 Aug 2018 15:43:03 +0100 Subject: [PATCH 2/2] Fix elif azure statement --- roles/kubernetes/node/templates/kubelet.standard.env.j2 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/roles/kubernetes/node/templates/kubelet.standard.env.j2 b/roles/kubernetes/node/templates/kubelet.standard.env.j2 index e90a6e3bd..70de7d28f 100644 --- a/roles/kubernetes/node/templates/kubelet.standard.env.j2 +++ b/roles/kubernetes/node/templates/kubelet.standard.env.j2 @@ -117,7 +117,7 @@ KUBELET_VOLUME_PLUGIN="--volume-plugin-dir={{ kubelet_flexvolumes_plugins_dir }} KUBE_ALLOW_PRIV="--allow-privileged=true" {% if cloud_provider is defined and cloud_provider in ["openstack", "vsphere"] %} KUBELET_CLOUDPROVIDER="--cloud-provider={{ cloud_provider }} --cloud-config={{ kube_config_dir }}/cloud_config" -{% if cloud_provider is defined and cloud_provider in ["azure"] %} +{% elif cloud_provider is defined and cloud_provider in ["azure"] %} KUBELET_CLOUDPROVIDER="--cloud-provider={{ cloud_provider }} --cloud-config={{ kube_config_dir }}/cloud_config --azure-container-registry-config={{ kube_config_dir }}/cloud_config" {% elif cloud_provider is defined and cloud_provider in ["aws", "external"] %} KUBELET_CLOUDPROVIDER="--cloud-provider={{ cloud_provider }}"