Skip to content

Commit 8aaa751

Browse files
authored
Merge pull request kubernetes#94374 from jingxu97/Aug/csiproxyservice
Start CSI proxy as service
2 parents e688a06 + 28ab348 commit 8aaa751

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)