Skip to content

Commit

Permalink
tt
Browse files Browse the repository at this point in the history
  • Loading branch information
vulkoingim committed Jun 1, 2022
1 parent 5f3e53b commit 213815b
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
6 changes: 3 additions & 3 deletions .werft/platform-delete-preview-environments-cron.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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()
Expand Down
4 changes: 2 additions & 2 deletions .werft/platform-delete-preview-environments-cron.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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 * * * *"

0 comments on commit 213815b

Please sign in to comment.