pytogo / portforward

Kubernetes Port-Forward Go-Edition For Python
https://portforward.readthedocs.io
MIT License
17 stars 6 forks source link

Request: In-cluster configuration #16

Closed atti92 closed 1 year ago

atti92 commented 1 year ago

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.

corka149 commented 1 year ago

Hi @atti92

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