BinderHub-generated environment overridden by default JupyterHub environments
JColl88 opened this issue · comments
Bug description
I'm not 100% sure this is a bug, but I'm reporting here with a workaround in case it's useful to others.
When the jupyterhub.singleuser.profileList
is set, the first of these seemingly overrides any environments spawned by Binder.
Behaviour
I would like to use BinderHub, while retaining utility of the associated JupyterHub as a standalone service.
In this example, JupyterHub is running at jupyterhub.url.com
and Binder is running at binderhub.url.com
. The Binder is configured with hub_url
set to jupyterhub.url.com
, so environments created via the Binder service are spawned on the JupyterHub running at jupyterhub.url.com
.
I would like the JupyterHub to offer a range of 'prebuilt' environments the user can choose from, which is supplied via e.g.:
jupyterhub:
singleuser:
profileList:
- display_name: "Env 1"
kubespawner_override:
image: <registry>/<image_1>:<tag>
- display_name: "Env 2"
kubespawner_override:
image: <registry>/<image_2>:<tag>
...
This works as expected; when navigating directly to jupyterhub.url.com
, the user is presented a range of environments to choose from.
If however, they launch a Binder from binderhub.url.com
, when the image is created and the user redirected over to jupyterhub.url.com
, the environment launched for them is the first in the profileList
, rather than the newly created image.
How to reproduce
- Deploy BinderHub via Helm, with the jupyterhub.singleuser.profileList populated with a set of default environments.
- Navigate to the Binder service and try building a custom environment.
The workaround
This is seemingly related to the kubespawner_override
for the first profile in the profileList. By simply removing the kubespawner_override
from the first profile, both Binder and JupyterHub function as expected. i.e. Modify the above to:
jupyterhub:
singleuser:
profileList:
- display_name: "Default"
- display_name: "Env 1"
kubespawner_override:
image: <registry>/<image_1>:<tag>
- display_name: "Env 2"
kubespawner_override:
image: <registry>/<image_2>:<tag>
...