From 687463d6746591d74639b2e2f7508b02a486f957 Mon Sep 17 00:00:00 2001 From: Prince Rachit Sinha Date: Wed, 30 Jun 2021 11:51:17 +0000 Subject: [PATCH] Remove for loop --- .werft/build.ts | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/.werft/build.ts b/.werft/build.ts index 5a81222dbe874a..cde26bfe98e202 100644 --- a/.werft/build.ts +++ b/.werft/build.ts @@ -298,14 +298,10 @@ export async function deployToDev(deploymentConfig: DeploymentConfig, workspaceF try { if (deploymentConfig.cleanSlateDeployment) { // re-create namespace - for (let pathToKubeConfig of [""]) { - await cleanStateEnv(pathToKubeConfig); - } + await cleanStateEnv(""); } else { - for (let pathToKubeConfig of [""]) { - createNamespace(pathToKubeConfig, namespace, { slice: 'prep' }); - } + createNamespace("", namespace, { slice: 'prep' }); } // check how this affects further steps setKubectlContextNamespace(namespace, { slice: 'prep' }); @@ -398,7 +394,7 @@ export async function deployToDev(deploymentConfig: DeploymentConfig, workspaceF } function installGitpodOnK3sWsCluster(commonFlags: string, pathToKubeConfig: string) { - if(!k3sWsCluster){ + if (!k3sWsCluster) { return } let flags = commonFlags