We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 6862def commit d47bfffCopy full SHA for d47bfff
src/warnet/k8s.py
@@ -135,8 +135,10 @@ def delete_namespace(namespace: str) -> bool:
135
return run_command(command)
136
137
138
-def delete_pod(pod_name: str) -> bool:
139
- command = f"kubectl -n {get_default_namespace()} delete pod {pod_name}"
+def delete_pod(pod_name: str, namespace: Optional[str] = None) -> bool:
+ if not namespace:
140
+ namespace = get_default_namespace()
141
+ command = f"kubectl -n {namespace} delete pod {pod_name}"
142
return stream_command(command)
143
144
0 commit comments