Skip to content

Commit 44689d0

Browse files
committed
k8s: add optional ns to get_edges
1 parent af8ca0f commit 44689d0

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

src/warnet/k8s.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -81,9 +81,11 @@ def get_pod_exit_status(pod_name, namespace: Optional[str] = None):
8181
return None
8282

8383

84-
def get_edges() -> any:
84+
def get_edges(namespace: Optional[str] = None) -> any:
85+
if not namespace:
86+
namespace = get_default_namespace()
8587
sclient = get_static_client()
86-
configmap = sclient.read_namespaced_config_map(name="edges", namespace="warnet")
88+
configmap = sclient.read_namespaced_config_map(name="edges", namespace=namespace)
8789
return json.loads(configmap.data["data"])
8890

8991

0 commit comments

Comments
 (0)