Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Static ports (instead of random) #1

Open
caseypugh opened this issue Jul 17, 2021 · 2 comments
Open

Static ports (instead of random) #1

caseypugh opened this issue Jul 17, 2021 · 2 comments

Comments

@caseypugh
Copy link

caseypugh commented Jul 17, 2021

This tool has been super useful! Feature request: It'd be nice if there was a way to generate the same, unique port for each pod every time. I'm using a StatefulSet with 5 replicas and would like to guarantee that pod-0 through pod-5 always get the same unique port. I don't really care what the external ports are, as long as they stay the same.

@0blu
Copy link
Owner

0blu commented Jul 24, 2021

Interesting use case, I assume that your client software cannot handle dynamic ports?

In general, I think your idea is possible.
The tool just needs to allocate the Service and add an internal annotation to the StatefulSet.
When new pods are created, this tool takes a free Service and assigns the Endpoint to the pod.

I am not quite sure how rolling upgrades behave and if there is the possibility of more than 5 (your example) nodes running at the same time.

Unfortunately, I don't have time to implement such a feature current.

@caseypugh
Copy link
Author

It's just a nice-to-have for the project I'm working on. The software can handle it... it creates a P2P connection with another client (outside the cluster) and when the pod needs to restart, would be nice to maintain the same IP:port for the P2P network it's connecting to.

Thanks for considering it!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants