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