From 555c8dbd1b87345463386ab6aee19de4ff393f38 Mon Sep 17 00:00:00 2001 From: Jing Xu Date: Wed, 9 Sep 2020 18:43:39 -0700 Subject: [PATCH] Update csi-proxy to use beta version This PR update csi-proxy version, remove diskutil.exe and set up log file --- cluster/gce/config-common.sh | 2 +- cluster/gce/windows/k8s-node-setup.psm1 | 17 +++++------------ 2 files changed, 6 insertions(+), 13 deletions(-) diff --git a/cluster/gce/config-common.sh b/cluster/gce/config-common.sh index 18147b39b5b..bd90712cdad 100644 --- a/cluster/gce/config-common.sh +++ b/cluster/gce/config-common.sh @@ -162,4 +162,4 @@ export WINDOWS_INFRA_CONTAINER="gcr.io/gke-release/pause-win:1.2.1" # Storage Path for csi-proxy. csi-proxy only needs to be installed for Windows. export CSI_PROXY_STORAGE_PATH="https://storage.googleapis.com/gke-release/csi-proxy" # Version for csi-proxy -export CSI_PROXY_VERSION="v0.1.0-gke.1" \ No newline at end of file +export CSI_PROXY_VERSION="v0.2.0-gke.0" \ No newline at end of file diff --git a/cluster/gce/windows/k8s-node-setup.psm1 b/cluster/gce/windows/k8s-node-setup.psm1 index bd80e381870..4cc43249d82 100644 --- a/cluster/gce/windows/k8s-node-setup.psm1 +++ b/cluster/gce/windows/k8s-node-setup.psm1 @@ -420,7 +420,8 @@ function DownloadAndInstall-CSIProxyBinaries { function Start-CSIProxy { if (Test-IsTestCluster $kube_env) { Log-Output "Creating CSI Proxy Service" - & sc.exe create csiproxy binPath= "${env:NODE_DIR}\csi-proxy.exe --windows-service" + $flags = "-windows-service -log_file=${env:LOGS_DIR}\csi-proxy.log -logtostderr=false" + & sc.exe create csiproxy binPath= "${env:NODE_DIR}\csi-proxy.exe $flags" & sc.exe failure csiproxy reset= 0 actions= restart/10000 Log-Output "Starting CSI Proxy Service" & sc.exe start csiproxy @@ -930,17 +931,9 @@ function Configure-GcePdTools { } Add-Content $PsHome\profile.ps1 ` -'$modulePath = "K8S_DIR\GetGcePdName.dll" -Unblock-File $modulePath -Import-Module -Name $modulePath'.replace('K8S_DIR', ${env:K8S_DIR}) - if (Test-IsTestCluster $kube_env) { - if (ShouldWrite-File ${env:K8S_DIR}\diskutil.exe) { - # The source code of this executable file is https://github.com/kubernetes-sigs/sig-windows-tools/blob/master/cmd/diskutil/diskutil.c - MustDownload-File -OutFile ${env:K8S_DIR}\diskutil.exe ` - -URLs "https://ddebroywin1.s3-us-west-2.amazonaws.com/diskutil.exe" - } - Copy-Item ${env:K8S_DIR}\diskutil.exe -Destination "C:\Windows\system32" - } + '$modulePath = "K8S_DIR\GetGcePdName.dll" + Unblock-File $modulePath + Import-Module -Name $modulePath'.replace('K8S_DIR', ${env:K8S_DIR}) } # Setup cni network. This function supports both Docker and containerd.