From 213815bf88c16154656b09843211bc982db5e4c3 Mon Sep 17 00:00:00 2001 From: Aleksandar Date: Wed, 1 Jun 2022 11:54:26 +0000 Subject: [PATCH] tt --- .werft/platform-delete-preview-environments-cron.ts | 6 +++--- .werft/platform-delete-preview-environments-cron.yaml | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/.werft/platform-delete-preview-environments-cron.ts b/.werft/platform-delete-preview-environments-cron.ts index 9ae4919a16fb66..587da2c6bede7d 100644 --- a/.werft/platform-delete-preview-environments-cron.ts +++ b/.werft/platform-delete-preview-environments-cron.ts @@ -58,7 +58,7 @@ class HarvesterPreviewEnvironment { name: string // The namespace in the k3s cluster where all resources are (default) - static readonly k3sNamespace: string = "default" + k3sNamespace: string = "default" constructor (namespace: string) { this.namespace = namespace @@ -97,7 +97,7 @@ class HarvesterPreviewEnvironment { } catch(e){ if (e instanceof VM.NotFoundError){ werft.log(sliceID, `${this.name} - is-active=false - The VM doesn't exist, deleting the environment`) - return false + return true } werft.log(sliceID, `${this.name} - is-active=true - Unexpected error trying to get the VM. Marking env as active: ${e.message}`) return true @@ -133,7 +133,7 @@ class HarvesterPreviewEnvironment { VM.stopKubectlPortForwards() exec(`rm ${PREVIEW_K3S_KUBECONFIG_PATH}`, { silent :true, slice: sliceID }) - return active + return true } catch (err) { // cleanup in case of an error VM.stopKubectlPortForwards() diff --git a/.werft/platform-delete-preview-environments-cron.yaml b/.werft/platform-delete-preview-environments-cron.yaml index f954ade5aceb77..98158002f0010c 100644 --- a/.werft/platform-delete-preview-environments-cron.yaml +++ b/.werft/platform-delete-preview-environments-cron.yaml @@ -70,5 +70,5 @@ pod: (cd .werft && yarn install && mv node_modules ..) | werft log slice prep npx ts-node .werft/platform-delete-preview-environments-cron.ts -plugins: - cron: "15 * * * *" +#plugins: +# cron: "15 * * * *"