Skip to content

Commit

Permalink
fixup
Browse files Browse the repository at this point in the history
Signed-off-by: Anatolii Bazko <[email protected]>
  • Loading branch information
tolusha committed Feb 19, 2024
1 parent 96a24ce commit 9bd3195
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions src/tasks/pod-tasks.ts
Original file line number Diff line number Diff line change
Expand Up @@ -59,12 +59,13 @@ export namespace PodTasks {
return {
title: `Scale ${name} ${replicas > 0 ? 'Up' : 'Down'}`,
task: async (_ctx: any, task: any) => {
if (await kubeHelper.isDeploymentExist(deploymentName, namespace)) {
await kubeHelper.scaleDeployment(deploymentName, namespace, replicas)
task.title = `${task.title}...[OK]`
} else {
if (replicas === 0 && !await kubeHelper.isDeploymentExist(deploymentName, namespace)) {
task.title = `${task.title}...[Not found]`
return
}

await kubeHelper.scaleDeployment(deploymentName, namespace, replicas)
task.title = `${task.title}...[OK]`
},
}
}
Expand Down

0 comments on commit 9bd3195

Please sign in to comment.