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 66209c8 commit 2bc03f0Copy full SHA for 2bc03f0
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,
@@ -285,7 +286,13 @@ def _logs(pod_name: str, follow: bool):
285
286
else:
287
return # cancelled by user
288
- container_name = "bitcoincore" if pod_name.startswith("tank") else None
289
+ try:
290
+ pod = get_pod(pod_name)
291
+ container_names = [container.name for container in pod.spec.containers]
292
+ container_name = container_names[0]
293
+ except Exception as e:
294
+ print(f"Could not determine primary container: {e}")
295
+ container_name = None
296
297
try:
298
stream = pod_log(pod_name, container_name=container_name, follow=follow)
0 commit comments