Skip to content

Commit 2f883e5

Browse files
authored
Merge pull request kubernetes#90618 from jingxu97/Mar/windows
Install diskutil into GCE windows node
2 parents f42cabe + e71acff commit 2f883e5

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

cluster/gce/windows/k8s-node-setup.psm1

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -892,6 +892,16 @@ function Configure-GcePdTools {
892892
'$modulePath = "K8S_DIR\GetGcePdName.dll"
893893
Unblock-File $modulePath
894894
Import-Module -Name $modulePath'.replace('K8S_DIR', ${env:K8S_DIR})
895+
896+
if (Test-IsTestCluster $kube_env) {
897+
if (ShouldWrite-File ${env:K8S_DIR}\diskutil.exe) {
898+
# The source code of this executable file is https://github.com/kubernetes-sigs/sig-windows-tools/blob/master/cmd/diskutil/diskutil.c
899+
MustDownload-File -OutFile ${env:K8S_DIR}\diskutil.exe `
900+
-URLs "https://ddebroywin1.s3-us-west-2.amazonaws.com/diskutil.exe"
901+
}
902+
Copy-Item ${env:K8S_DIR}\diskutil.exe -Destination "C:\Windows\system32"
903+
}
904+
895905
}
896906

897907
# Setup cni network. This function supports both Docker and containerd.

0 commit comments

Comments
 (0)