From 116465bb0429baf0160f6bc9c5d2feb279cb53a0 Mon Sep 17 00:00:00 2001 From: Jing Xu Date: Fri, 7 Aug 2020 09:45:51 -0700 Subject: [PATCH] Add test cluster check when starting csi proxy Add the check for test cluster when starting csi proxy --- cluster/gce/windows/k8s-node-setup.psm1 | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/cluster/gce/windows/k8s-node-setup.psm1 b/cluster/gce/windows/k8s-node-setup.psm1 index f8485e1e2fa..0fdb2ed102b 100644 --- a/cluster/gce/windows/k8s-node-setup.psm1 +++ b/cluster/gce/windows/k8s-node-setup.psm1 @@ -419,8 +419,10 @@ function DownloadAndInstall-CSIProxyBinaries { # TODO(jingxu97): Make csi-proxy.exe as a service similar to kubelet.exe function Start-CSIProxy { - Log-Output 'Starting CSI Proxy' - Start-Process "${env:NODE_DIR}\csi-proxy.exe" + if (Test-IsTestCluster $kube_env) { + Log-Output 'Starting CSI Proxy' + Start-Process "${env:NODE_DIR}\csi-proxy.exe" + } } # TODO(pjh): this is copied from @@ -929,7 +931,6 @@ function Configure-GcePdTools { '$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