txn2 / kubefwd

Bulk port forwarding Kubernetes services for local development.
https://imti.co/kubernetes-port-forwarding/
Apache License 2.0
3.8k stars 205 forks source link

More granular control on kubefwd resync behavior #277

Open benfiola opened 4 months ago

benfiola commented 4 months ago

Background

I'm trying to set up a local development environment - and part of that process includes starting a minikube cluster. It'd be great to automatically launch kubefwd in the background and have it automatically forward all current and future services to my machine for easy access.

Problem

On launch, if kubefwd fails to find matching pods for created services - it'll wait 5 minutes before attempting to re-sync these services.

I attempted to work around this by starting kubefwd in the background while periodically pushing new annotations to all of my services in the hopes that it'd trigger a resync. However, it looks like the update handler for service resources currently is a no-op

Potential Solutions

If either of these sound good, I'm more than happy to write a PR to implement it. Also, thanks for writing kubefwd - it's really useful!