Skip to content

Commit 11f49bf

Browse files
authored
Merge pull request #602 from bitcoin-dev-project/stop-all
stop: use default namespace
2 parents 9129c9d + 67d761f commit 11f49bf

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
@@ -77,14 +77,14 @@ def stop(scenario_name):
7777
def stop_scenario(scenario_name):
7878
"""Stop a single scenario using Helm"""
7979
# Stop the pod immediately (faster than uninstalling)
80-
cmd = f"kubectl delete pod {scenario_name} --grace-period=0 --force"
80+
namespace = get_default_namespace()
81+
cmd = f"kubectl --namespace {namespace} delete pod {scenario_name} --grace-period=0 --force"
8182
if stream_command(cmd):
8283
console.print(f"[bold green]Successfully stopped scenario: {scenario_name}[/bold green]")
8384
else:
8485
console.print(f"[bold red]Failed to stop scenario: {scenario_name}[/bold red]")
8586

8687
# Then uninstall via helm (non-blocking)
87-
namespace = get_default_namespace()
8888
command = f"helm uninstall {scenario_name} --namespace {namespace} --wait=false"
8989

9090
# Run the helm uninstall command in the background

0 commit comments

Comments
 (0)