Skip to content

Commit b0a78ef

Browse files
authored
Merge pull request #501 from mplsgrant/2024-08-fix-warcli-down-namespace
fix `warcli down` namespace
2 parents 87ea1ff + 900920e commit b0a78ef

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/warnet/control.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,7 @@ def down():
123123
tanks = get_mission("tank")
124124
with console.status("[yellow]Uninstalling tanks...[/yellow]"):
125125
for tank in tanks:
126-
cmd = f"helm uninstall {tank.metadata.name}"
126+
cmd = f"helm uninstall {tank.metadata.name} --namespace {get_default_namespace()}"
127127
if stream_command(cmd):
128128
console.print(f"[green]Uninstalled tank: {tank.metadata.name}[/green]")
129129
else:
@@ -133,7 +133,7 @@ def down():
133133
pods = get_pods()
134134
with console.status("[yellow]Cleaning up remaining pods...[/yellow]"):
135135
for pod in pods.items:
136-
cmd = f"kubectl delete pod --ignore-not-found=true {pod.metadata.name}"
136+
cmd = f"kubectl delete pod --ignore-not-found=true {pod.metadata.name} -n {get_default_namespace()}"
137137
if stream_command(cmd):
138138
console.print(f"[green]Deleted pod: {pod.metadata.name}[/green]")
139139
else:

0 commit comments

Comments
 (0)