Open Ph0tonic opened 10 months ago
Thank you for opening your first issue in this project! Engagement like this is essential for open source projects! :hugs:
If you haven't done so already, check out Jupyter's Code of Conduct. Also, please try to follow the issue template as it helps other other community members to contribute more effectively.
You can meet the other Jovyans by joining our Discourse forum. There is also an intro thread there where you can stop by and say Hi! :wave:
Welcome to the Jupyter community! :tada:
I've never learned how ProfileSpawner works, but I see that you configure it to recognize it wraps KubeSpawner, and I assume you have the hub
pod's image include this project to get this far.
I'm unable to allocate time to dig into the details about this, but here are some relevant debugging notes:
spec.containers[0].ports[0].containerPort
is reported required and missing. What code in kubespawner sets that, and why isn't that set etc? Note that if this was an error reported by itself, I'd suspect it was caused by some config, maybe via extra_container_config
or similar making that part become overridden.Thank you very much for your feedback! I noticed, I was not using the latest version of KubeSpawner
and after the update I got another issue. See https://github.com/jupyterhub/wrapspawner/pull/59 if you are interested.
I will now try to fix this issue with the help of your debugging notes :+1: and post any progress here.
All right, so after some research, I was finally able to identify all variables that were overridden by WrapSpawner
. Here is the config that I used to make it work with the base config of z2jh
:
c.ProfilesSpawner.profiles = [
('Kube', 'kubespawner', 'kubespawner.KubeSpawner', {
'ip':'0.0.0.0', 'port': 0, 'cmd': None, 'path': None, 'environment': {}, 'env_keep': []}),
# Other spawner here
]
Without these variables overridden manually, the spawner is not able to launch any pod and connect to it.
Note: See https://github.com/jupyterhub/wrapspawner/pull/59 and https://github.com/jupyterhub/wrapspawner/pull/60
Bug description
Hi, I would like to use this
ProfilesSpawner
with https://github.com/jupyterhub/zero-to-jupyterhub-k8s. z2jh comes with an handy configuration to spawn pods in Kubernetes.Is there a way to forward the configuration to a profile of this spawner ?
How to reproduce
My idea was to forward the config of KubeSpawner directly to the ProfilesSpawner however I get an error. Here is some of the config that I tried and would love to work.
And here is the error :
I am not very familiar with traitlets and how they work. I guess that I am missing something there. From what I understood, some default configurations are not loaded this way. Any help would be welcome, it could be great to be able to combine easily z2jh and this project.
\cc @consideRatio
Expected behaviour
I would expect to pass a valid configuration.
Actual behaviour
It currently fails.