From bb923adcedd65d991cf29227b5ce9699e9eb0c8d Mon Sep 17 00:00:00 2001 From: Mitchell Friedman Date: Tue, 31 Mar 2020 16:58:47 +0100 Subject: [PATCH] fix(k8s): cleanup kaniko pod (#1757) Co-authored-by: Mitchell Friedman --- .../src/plugins/kubernetes/container/build.ts | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) diff --git a/garden-service/src/plugins/kubernetes/container/build.ts b/garden-service/src/plugins/kubernetes/container/build.ts index a6a745582d..b1696febf7 100644 --- a/garden-service/src/plugins/kubernetes/container/build.ts +++ b/garden-service/src/plugins/kubernetes/container/build.ts @@ -610,13 +610,17 @@ async function runKaniko({ provider, namespace, log, module, args, outputStream }, }) - return runner.startAndWait({ - ignoreError: true, - interactive: false, - log, - timeout: module.spec.build.timeout, - stdout: outputStream, - }) + try { + return runner.startAndWait({ + ignoreError: true, + interactive: false, + log, + timeout: module.spec.build.timeout, + stdout: outputStream, + }) + } finally { + await runner.stop() + } } async function getManifestInspectArgs(module: ContainerModule, deploymentRegistry: ContainerRegistryConfig) {