Skip to content

Commit

Permalink
delete pods in default nmespace
Browse files Browse the repository at this point in the history
  • Loading branch information
pinheadmz committed Aug 22, 2024
1 parent c26c371 commit dde6adc
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions src/warnet/cli/network.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
delete_namespace,
get_default_namespace,
get_mission,
get_pods
)
from .process import stream_command

Expand Down Expand Up @@ -115,11 +116,14 @@ def start(network_name: str, logging: bool, network: str):
@network.command()
def down():
"""Bring down a running warnet"""
namespace = get_default_namespace()
if delete_namespace(namespace) and delete_namespace("warnet-logging"):
print("Warnet network has been successfully brought down and the namespaces deleted.")
if delete_namespace("warnet-logging"):
print("Warnet logging deleted")
else:
print("Failed to bring down warnet network or delete the namespaces.")
print("Warnet logging NOT deleted")
pods = get_pods()
for pod in pods.items:
cmd = f"helm uninstall {pod.metadata.name}"
stream_command(cmd)


@network.command()
Expand Down

0 comments on commit dde6adc

Please sign in to comment.