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 a46f1c2 commit 7783990Copy full SHA for 7783990
src/warnet/k8s.py
@@ -66,10 +66,12 @@ def get_mission(mission: str) -> list[V1Pod]:
66
return crew
67
68
69
-def get_pod_exit_status(pod_name):
+def get_pod_exit_status(pod_name, namespace: Optional[str] = None):
70
+ if not namespace:
71
+ namespace = get_default_namespace()
72
try:
73
sclient = get_static_client()
- pod = sclient.read_namespaced_pod(name=pod_name, namespace=get_default_namespace())
74
+ pod = sclient.read_namespaced_pod(name=pod_name, namespace=namespace)
75
for container_status in pod.status.container_statuses:
76
if container_status.state.terminated:
77
return container_status.state.terminated.exit_code
0 commit comments