diff --git a/deployer/commands/exec/infra_components.py b/deployer/commands/exec/infra_components.py index a4bba4d40..909f31674 100644 --- a/deployer/commands/exec/infra_components.py +++ b/deployer/commands/exec/infra_components.py @@ -23,6 +23,7 @@ def root_homes( cluster_name: str = typer.Argument(..., help="Name of cluster to operate on"), hub_name: str = typer.Argument(..., help="Name of hub to operate on"), + rm_pod: bool = typer.Option(False, "--rm", help="Automatically delete the pod after completing"), extra_nfs_server: str = typer.Option( None, help="IP address of an extra NFS server to mount" ), @@ -134,6 +135,9 @@ def root_homes( subprocess.check_call(create_cmd) subprocess.check_call(exec_cmd) + # I want to ensure this code runs event if the exec cmd returns an exit code other than 0 + if rm_pod: + delete_pod(pod_name, hub_name) # I want to ensure this code runs event if the exec cmd returns an exit code other than 0 # Delete temporary pod spec file