Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 14 additions & 1 deletion src/warnet/ln.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
get_default_namespace_or,
get_pod,
)
from .process import run_command
from .process import run_command, stream_command


@click.group(name="ln")
Expand Down Expand Up @@ -69,3 +69,16 @@ def _host(pod):
return uris[0].split("@")[1]
else:
return ""

@ln.command()
@click.argument("pod", type=str)
@click.argument("local_port", type=int)
def port_forward(
pod: str,
local_port: int
):
"""
Port forward lightning node from <ln pod name>
"""
command = f"kubectl port-forward {pod} {local_port}:10009"
return stream_command(command)
Loading