Skip to content

Commit 6327b72

Browse files
changes for checking if it is an AKS cluster
1 parent 82f827d commit 6327b72

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

kubernetes/windows/main.ps1

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -311,7 +311,9 @@ Set-EnvironmentVariables
311311
Start-FileSystemWatcher
312312

313313
#Bootstrapping CA certs for non public clouds and AKS clusters
314-
if (![string]::IsNullOrEmpty([System.Environment]::GetEnvironmentVariable("AKS_RESOURCE_ID"))) {
314+
$aksResourceId = [System.Environment]::GetEnvironmentVariable("AKS_RESOURCE_ID")
315+
if (![string]::IsNullOrEmpty($aksResourceId) && $aksResourceId.ToLower() -contains "/microsoft.containerservice/managedclusters/")
316+
{
315317
Bootstrap-CACertificates
316318
}
317319

0 commit comments

Comments
 (0)