fix: ensure cni conf json is valid when exception list contains a single address (#2157)

This commit is contained in:
Mark Rossetti 2019-10-14 17:17:31 -07:00 коммит произвёл Azure Kubernetes Service Bot
Родитель 65ec471f81
Коммит f700c4746c
2 изменённых файлов: 6 добавлений и 4 удалений

Просмотреть файл

@ -90,7 +90,7 @@ Set-AzureCNIConfig
$configJson.plugins.AdditionalArgs[0].Value.ExceptionList = $processedExceptions
}
else {
$configJson.plugins.AdditionalArgs[0].Value.ExceptionList[0] = $exceptionAddresses
$configJson.plugins.AdditionalArgs[0].Value.ExceptionList = $exceptionAddresses
}
$configJson.plugins.AdditionalArgs[1].Value.DestinationPrefix = $KubeServiceCIDR
@ -126,7 +126,8 @@ function GetBroadestRangesForEachAddress{
$returnValues += $ip + "/" + $range
}
return $returnValues
# prefix $returnValues with common to ensure single values get returned as an array otherwise invalid json may be generated
return ,$returnValues
}
function GetSubnetPrefix

Просмотреть файл

@ -30780,7 +30780,7 @@ Set-AzureCNIConfig
$configJson.plugins.AdditionalArgs[0].Value.ExceptionList = $processedExceptions
}
else {
$configJson.plugins.AdditionalArgs[0].Value.ExceptionList[0] = $exceptionAddresses
$configJson.plugins.AdditionalArgs[0].Value.ExceptionList = $exceptionAddresses
}
$configJson.plugins.AdditionalArgs[1].Value.DestinationPrefix = $KubeServiceCIDR
@ -30816,7 +30816,8 @@ function GetBroadestRangesForEachAddress{
$returnValues += $ip + "/" + $range
}
return $returnValues
# prefix $returnValues with common to ensure single values get returned as an array otherwise invalid json may be generated
return ,$returnValues
}
function GetSubnetPrefix