@@ -115,7 +115,7 @@ $global:ExcludeMasterFromStandardLB = "{{WrapAsVariable "excludeMasterFromStanda
115115# Windows defaults, not changed by aks-engine
116116$global :CacheDir = " c:\akse-cache"
117117$global :KubeDir = " c:\k"
118- $global :HNSModule = [Io.path ]::Combine(" $global :KubeDir " , " hns.psm1" )
118+ $global :HNSModule = [Io.path ]::Combine(" $global :KubeDir " , " hns.v2. psm1" )
119119
120120$global :KubeDnsSearchPath = " svc.cluster.local"
121121
@@ -173,7 +173,6 @@ Expand-Archive scripts.zip -DestinationPath "C:\\AzureData\\"
173173. c:\AzureData\k8s\windowscontainerdfunc.ps1
174174. c:\AzureData\k8s\windowshostsconfigagentfunc.ps1
175175
176- $useContainerD = ($global :ContainerRuntime -eq " containerd" )
177176$global :KubeClusterConfigPath = " c:\k\kubeclusterconfig.json"
178177
179178try
@@ -277,27 +276,17 @@ try
277276 Get-KubeBinaries - KubeBinariesURL $global :WindowsKubeBinariesURL
278277 }
279278
280- if ($useContainerD ) {
281- Write-Log " Installing ContainerD"
282- $containerdTimer = [System.Diagnostics.Stopwatch ]::StartNew()
283- $cniBinPath = $global :AzureCNIBinDir
284- $cniConfigPath = $global :AzureCNIConfDir
285- if ($global :NetworkPlugin -eq " kubenet" ) {
286- $cniBinPath = $global :CNIPath
287- $cniConfigPath = $global :CNIConfigPath
288- }
289- Install-Containerd - ContainerdUrl $global :ContainerdUrl - CNIBinDir $cniBinPath - CNIConfDir $cniConfigPath - KubeDir $global :KubeDir
290- $containerdTimer.Stop ()
291- $global :AppInsightsClient.TrackMetric (" Install-ContainerD" , $containerdTimer.Elapsed.TotalSeconds )
292- # TODO: disable/uninstall Docker later
293- } else {
294- Write-Log " Install docker"
295- $dockerTimer = [System.Diagnostics.Stopwatch ]::StartNew()
296- Install-Docker - DockerVersion $global :DockerVersion
297- Set-DockerLogFileOptions
298- $dockerTimer.Stop ()
299- $global :AppInsightsClient.TrackMetric (" Install-Docker" , $dockerTimer.Elapsed.TotalSeconds )
279+ Write-Log " Installing ContainerD"
280+ $containerdTimer = [System.Diagnostics.Stopwatch ]::StartNew()
281+ $cniBinPath = $global :AzureCNIBinDir
282+ $cniConfigPath = $global :AzureCNIConfDir
283+ if ($global :NetworkPlugin -eq " kubenet" ) {
284+ $cniBinPath = $global :CNIPath
285+ $cniConfigPath = $global :CNIConfigPath
300286 }
287+ Install-Containerd - ContainerdUrl $global :ContainerdUrl - CNIBinDir $cniBinPath - CNIConfDir $cniConfigPath - KubeDir $global :KubeDir
288+ $containerdTimer.Stop ()
289+ $global :AppInsightsClient.TrackMetric (" Install-ContainerD" , $containerdTimer.Elapsed.TotalSeconds )
301290
302291 Write-Log " Write Azure cloud provider config"
303292 Write-AzureConfig `
@@ -351,19 +340,14 @@ try
351340
352341 Write-Log " Create the Pause Container kubletwin/pause"
353342 $infraContainerTimer = [System.Diagnostics.Stopwatch ]::StartNew()
354- New-InfraContainer - KubeDir $global :KubeDir - ContainerRuntime $ global :ContainerRuntime
343+ New-InfraContainer - KubeDir $global :KubeDir
355344 $infraContainerTimer.Stop ()
356345 $global :AppInsightsClient.TrackMetric (" New-InfraContainer" , $infraContainerTimer.Elapsed.TotalSeconds )
357346
358- if (-not (Test-ContainerImageExists - Image " kubletwin/pause" - ContainerRuntime $ global :ContainerRuntime )) {
347+ if (-not (Test-ContainerImageExists - Image " kubletwin/pause" )) {
359348 Write-Log " Could not find container with name kubletwin/pause"
360- if ($useContainerD ) {
361- $o = ctr - n k8s.io image list
362- Write-Log $o
363- } else {
364- $o = docker image list
365- Write-Log $o
366- }
349+ $o = ctr - n k8s.io image list
350+ Write-Log $o
367351 throw " kubletwin/pause container does not exist!"
368352 }
369353
@@ -404,19 +388,14 @@ try
404388 }
405389 elseif ($global :NetworkPlugin -eq " kubenet" ) {
406390 Write-Log " Fetching additional files needed for kubenet"
407- if ($useContainerD ) {
408- # TODO: CNI may need to move to c:\program files\containerd\cni\bin with ContainerD
409- Install-SdnBridge - Url $global :ContainerdSdnPluginUrl - CNIPath $global :CNIPath
410- } else {
411- Update-WinCNI - CNIPath $global :CNIPath
412- }
391+ # TODO: CNI may need to move to c:\program files\containerd\cni\bin with ContainerD
392+ Install-SdnBridge - Url $global :ContainerdSdnPluginUrl - CNIPath $global :CNIPath
413393 }
414394
415395 New-ExternalHnsNetwork - IsDualStackEnabled $global :IsDualStackEnabled
416396
417397 Install-KubernetesServices `
418- - KubeDir $global :KubeDir `
419- - ContainerRuntime $global :ContainerRuntime
398+ - KubeDir $global :KubeDir
420399
421400 Get-LogCollectionScripts
422401
441420 PREPROVISION_EXTENSION
442421
443422 Write-Log " Update service failure actions"
444- Update-ServiceFailureActions - ContainerRuntime $ global :ContainerRuntime
423+ Update-ServiceFailureActions
445424
446425 Adjust- DynamicPortRange
447426 Register-LogsCleanupScriptTask
0 commit comments