-
Notifications
You must be signed in to change notification settings - Fork 305
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
[Feature] Let singleuser server select a free random port to listen on #448
base: main
Are you sure you want to change the base?
Conversation
Thanks for submitting your first pull request! You are awesome! 🤗 |
Before you spend too much time on this (I haven't read it yet), you might want to look at:
Perhaps you'd like to work on the jupyterhub improvement some, then hook into that? |
Note: I know some of batchspawner, less involved in both kubespawner and jupyterhub. I hope someone else more knowledgeable will comment on which options they recommend you to look into. By all means, take over the pull request jupyterhub/jupyterhub#2727 that I started! It was designed in consultation with the JH team. |
Hi @rkdarst , thanks for your feedback 👍 |
I love the idea of having a generic callback endpoint for spawners to submit arbitrary data 🤔
Is it foreseeable to be merged soon-ish?
I think yes, if someone works on it. @minrk already went over the
concepts, which is the important thing.
If someone (you?) can work on it, I could see it getting done soon.
Like I think I said, I might not get back to it any time, but from
this PR you might be a good one to push it forward... is there
anything I could help with?
|
I'm confused why there are so many commits unrelated to this PR. Can you rebase on master so I better understand whats really relevant to review @iwilltry42? |
d953aa3
to
d39138e
Compare
Hi @consideRatio , sorry for the commit mess.. don't know what happened there when merging master. I now rebased onto master, but couldn't get rid of that one commit in travis (although I didn't change anything there).. However, right now that's only a newline 🤷♂️ @rkdarst , I'm trying to understand jupyterhub/jupyterhub#2727 now, however I feel like I'm lacking a clear specification there and am not sure if I can just pick it up on the fly. |
... if the kubespawner/port: auto annotation is set Signed-off-by: Thorsten Klein <[email protected]>
About
This PR adds the functionality to let the singleuser server/pod choose the port it's listening on itself.
For this, you need to have the
jupyterhub-kubespawner
package installed in both, the JupyterHub Server and the Singleuser Server image.How it works
Currently, it works by setting the
kubespawner/port: auto
annotation on the profile list. I guess it would be way better to have it as a real config option for kubespawner or be assumed when settingport = 0
.It works almost exactly like the similar change in batchspawner (see jupyterhub/batchspawner#58 & jupyterhub/batchspawner#130).
Example Use Case
Our use case is to be able to connect to a remote Hadoop cluster, executing pySpark in client mode (so the Hadoop nodes can talk back to a real IP and not to the non-routeable Pod-IP). In this case, the singleuser pods run in
hostNetwork: true
mode.Without this feature, the default ports would collide if more than one singleuser server is being scheduled to the same node.
We're using this in production for several months now, without any issues so far.
Related Issues
This could fix #299