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.
_logs
1 parent dccbd6c commit 75cb339Copy full SHA for 75cb339
src/warnet/control.py
@@ -20,6 +20,7 @@
20
delete_pod,
21
get_default_namespace,
22
get_mission,
23
+ get_pod,
24
get_pods,
25
pod_log,
26
snapshot_bitcoin_datadir,
@@ -286,7 +287,13 @@ def _logs(pod_name: str, follow: bool):
286
287
else:
288
return # cancelled by user
289
- container_name = "bitcoincore" if pod_name.startswith("tank") else None
290
+ try:
291
+ pod = get_pod(pod_name)
292
+ container_names = [container.name for container in pod.spec.containers]
293
+ container_name = container_names[0]
294
+ except Exception as e:
295
+ print(f"Could not determine primary container: {e}")
296
+ container_name = None
297
298
try:
299
stream = pod_log(pod_name, container_name=container_name, follow=follow)
0 commit comments