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

Request: In-cluster configuration

atti92 opened this issue · comments

  • portforward version: 0.4.1
  • Python version: 3.10
  • Operating System: Linux
    Referenced issue: pytogo/pytogo#2

Description

We are trying to use this package in all kinds of scenarios, and one of those is running the code in a Job/Pod in the cluster. Currently the package demands a kube.config file. I suggest adding the Incluster config loading fallback to the Go code:
Example

What I Did

Currently we are trying to work around this issue by generating a kube.config file dynamically, but it is not a great solution.

Hi @atti92

thanks for the nice issue & hint/code snippet. I added the feature and it will be release today as 0.4.2.