Skip to content

Commit f0b2d4b

Browse files
committed
control: ignore logging namespaces
1 parent a05e0c7 commit f0b2d4b

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

src/warnet/control.py

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,8 @@
2121
BITCOINCORE_CONTAINER,
2222
COMMANDER_CHART,
2323
COMMANDER_CONTAINER,
24+
INGRESS_NAMESPACE,
25+
LOGGING_NAMESPACE,
2426
)
2527
from .k8s import (
2628
delete_pod,
@@ -365,7 +367,11 @@ def _logs(pod_name: str, follow: bool, namespace: Optional[str] = None):
365367
if pod_name == "":
366368
try:
367369
pods = get_pods()
368-
pod_list = [f"{item.metadata.name}: {item.metadata.namespace}" for item in pods]
370+
pod_list = [
371+
f"{item.metadata.name}: {item.metadata.namespace}"
372+
for item in pods
373+
if item.metadata.namespace not in [LOGGING_NAMESPACE, INGRESS_NAMESPACE]
374+
]
369375
except Exception as e:
370376
print(f"Could not fetch any pods in namespace {namespace}: {e}")
371377
return

0 commit comments

Comments
 (0)