omrikiei / ktunnel

A cli that exposes your local resources to kubernetes
GNU General Public License v3.0
928 stars 71 forks source link

feat: use static buffer, context for cancellation, and functional arguments #28

Closed jaredallard closed 3 years ago

jaredallard commented 3 years ago

What this PR does: This PR fixes the issues found in https://github.com/omrikiei/ktunnel/issues/24, and some struggles I ran into when trying to use this as a library with my own project. The main highlights are:

What's left?

This is what is keeping this in draft currently:

Notes for my reviewer: I'm happy to split this into chunks, if that's wanted!

jaredallard commented 3 years ago

Tested this out and it seems like there is issues with concurrent connections, going to need to fix this :sob:

omrikiei commented 3 years ago

Tested this out and it seems like there is issues with concurrent connections, going to need to fix this šŸ˜­

Could you elaborate? what are you seeing?

jaredallard commented 3 years ago

@omrikiei It looks like when two connections, or more, are made at once something is getting deadlocked.

I moved my project to ssh tunneling to remove this for now, and I'm pretty sure I actually fixed this but deleted the code on accident. I need to re-do this sometime soon. It might be a bit though, now that I stopped using this.

Maybe it makes sense to have this project also be using ssh tunneling?

omrikiei commented 3 years ago

Ill see if I'm able to reproduce and troubleshoot it