pytogo / portforward

Kubernetes Port-Forward Go-Edition For Python

Home Page:https://portforward.readthedocs.io

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Cannot maintain 2 portforwards to the same pod

atti92 opened this issue · comments

  • portforward version: 0.4.5
  • Python version: 3.10
  • Operating System: Linux

Description

Opening 1 portforward works fine.
Opening 2 portforwards on different pods works fine.
Opening 2 different port forwards on 1 pod, closes the first one initiated.

What I Did

import portforward
with portforward.forward("namespace", "pod-0", port1, port1):
    with portforward.forward("namespace", "pod-0", port2, port2):
        # doing some connection to those ports, port2 success, port1 is refused. (switching the order switches the working ports)

The feature will be released with version 0.5.0 today.

Thx for the issue!

Thanks it's working fine :)