Skip to content

Commit 28ab348

Browse files
committed
Start CSI proxy as service
Now CSI proxy can support starting as service. Update node startup script to create and start it as service
1 parent 4db3a09 commit 28ab348

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

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

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -417,11 +417,13 @@ function DownloadAndInstall-CSIProxyBinaries {
417417
}
418418
}
419419

420-
# TODO(jingxu97): Make csi-proxy.exe as a service similar to kubelet.exe
421420
function Start-CSIProxy {
422421
if (Test-IsTestCluster $kube_env) {
423-
Log-Output 'Starting CSI Proxy'
424-
Start-Process "${env:NODE_DIR}\csi-proxy.exe"
422+
Log-Output "Creating CSI Proxy Service"
423+
& sc.exe create csiproxy binPath= "${env:NODE_DIR}\csi-proxy.exe --windows-service"
424+
& sc.exe failure csiproxy reset= 0 actions= restart/10000
425+
Log-Output "Starting CSI Proxy Service"
426+
& sc.exe start csiproxy
425427
}
426428
}
427429

0 commit comments

Comments
 (0)