Skip to content

Commit

Permalink
feat: add bridge information after successful establish (#164)
Browse files Browse the repository at this point in the history
* feat: add bridge information after successful establish
* fix: split ports
  • Loading branch information
SteinRobert committed Sep 8, 2022
1 parent b315b3e commit eeaeabd
Showing 1 changed file with 13 additions and 1 deletion.
14 changes: 13 additions & 1 deletion client/gefyra/api/bridge.py
Original file line number Diff line number Diff line change
Expand Up @@ -194,7 +194,19 @@ def bridge(
waiting_time -= 1
if timeout and waiting_time <= 0:
raise RuntimeError("Timeout for bridging operation exceeded")

logger.info("Following bridges have been established:")
for ki in kube_ireqs:
for port in ports:
pod_name, ns, = (
ki["targetPod"],
ki["targetNamespace"],
)
bridge_ports = port.split(":")
container_port, pod_port = bridge_ports[0], bridge_ports[1]
logger.info(
f"Bridge for pod {pod_name} in namespace {ns} on port {pod_port} "
f"to local container {container_name} on port {container_port}"
)
return True


Expand Down

0 comments on commit eeaeabd

Please sign in to comment.