From 9b830a5a1e97b75035b80996676260828de5e206 Mon Sep 17 00:00:00 2001 From: Yves Laroche Date: Tue, 3 Nov 2020 15:08:15 +0000 Subject: [PATCH] Put KubeletExtraArgs in double quotes for Windows It is already quoted in the Bash script. This allows for variable substitution within the string e.g. kubelet_extra_args = "node.kubernetes.io/lifecycle=$(Invoke-WebRequest -Uri http://169.254.169.254/latest/meta-data/instance-life-cycle | Select-Object -ExpandProperty Content)" --- templates/userdata_windows.tpl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/templates/userdata_windows.tpl b/templates/userdata_windows.tpl index 61be8e8b110..e8856838f1c 100644 --- a/templates/userdata_windows.tpl +++ b/templates/userdata_windows.tpl @@ -4,7 +4,7 @@ ${pre_userdata} [string]$EKSBinDir = "$env:ProgramFiles\Amazon\EKS" [string]$EKSBootstrapScriptName = 'Start-EKSBootstrap.ps1' [string]$EKSBootstrapScriptFile = "$EKSBinDir\$EKSBootstrapScriptName" -& $EKSBootstrapScriptFile -EKSClusterName ${cluster_name} -KubeletExtraArgs '${kubelet_extra_args}' 3>&1 4>&1 5>&1 6>&1 +& $EKSBootstrapScriptFile -EKSClusterName ${cluster_name} -KubeletExtraArgs "${kubelet_extra_args}" 3>&1 4>&1 5>&1 6>&1 $LastError = if ($?) { 0 } else { $Error[0].Exception.HResult } ${additional_userdata}