Start CSI proxy as service

Now CSI proxy can support starting as service. Update node startup
script to create and start it as service
This commit is contained in:
Jing Xu 2020-08-31 10:40:40 -07:00
parent 4db3a096ce
commit 28ab3488b6

View File

@ -417,11 +417,13 @@ function DownloadAndInstall-CSIProxyBinaries {
} }
} }
# TODO(jingxu97): Make csi-proxy.exe as a service similar to kubelet.exe
function Start-CSIProxy { function Start-CSIProxy {
if (Test-IsTestCluster $kube_env) { if (Test-IsTestCluster $kube_env) {
Log-Output 'Starting CSI Proxy' Log-Output "Creating CSI Proxy Service"
Start-Process "${env:NODE_DIR}\csi-proxy.exe" & sc.exe create csiproxy binPath= "${env:NODE_DIR}\csi-proxy.exe --windows-service"
& sc.exe failure csiproxy reset= 0 actions= restart/10000
Log-Output "Starting CSI Proxy Service"
& sc.exe start csiproxy
} }
} }