I was trying to get the secret from jupyter hub to pass into the singleuser image. I am not sure where am i going wrong here? I am constantly getting an error that singleuser secret is missing in my new namespace where the pod was trying to start(jupyter server start process)
(⎈|eodhp-dev:jupyter)]$ k get secret -n jupyter
NAME TYPE DATA AGE
hub Opaque 4 5d23h
hub-secret-overrides Opaque 1 5d23h
singleuser Opaque 1 5d23h
I can see that the singleuser secret is definitely present. However, because I have enabled the kubespawner to create namespaces and the new container would be within that namespace, it seems that the single user is unable to pull the singleuser secret generated in the jupyter namespace. I am unsure of the right step to ensure that the single user running in a new namespace also has access to the singleuser secret. I am uncertain why it is preventing the creation of a new secret in the new namespace, although the secret appears to be present in the jupyter namespace.
I have another secret yaml which overrides the hub-secret like this as I am using keycloak
I believe that the singleuser secret is generated by Jupyter itself, as I am not creating it manually. The key point is that I have multiple namespaces. The primary namespace is jupyter, and various users will be using the JupyterHub to spawn their notebooks. When they start their notebook, the JupyterHub kubespawner creates new namespaces for user workspaces.
The error I am encountering states that the secret named singleuser is not mounting properly. I can see that this secret is created by the JupyterHub in the jupyter namespace. However, I am unable to understand why this is happening. My main concern is that my notebook should spawn correctly, but it keeps failing with the error that the singleuser secret is not present. I checked the new namespace and confirmed that the singleuser secret is indeed missing.
What are your thoughts on this issue? I believe the secret is created by the Helm chart of Jupyter. Do you have any suggestions on how to fix this issue? I am experiencing this problem in the new namespace that JupyterHub creates for each user.
I suspect the Jupyter configuration file, which is:
is placed within the singleuser block to allow S3 bucket access and manage the hybrid content manager. It seems this file is not being applied correctly. My guess is that it may be looking for the secret to function properly when new namespaces are created, with Jupyter running as an individual pod in those namespaces. However, it is unable to find the required secret.
If you refer my code in this channel you would find the values.yaml and secrets.yaml(this secret is only overriding the auth secret for user).
Sorry, you’re correct! The singleuser secret is created statically by the Helm chart and will only work in a single namespace:
You could try a third party extension to automatically mirror objects into other namespaces, for example
I haven’t used that so do your own due diligence.
Another option is to fetch the credentials dynamically, e.g. from a custom webservice. Since jupyter_server_config.py is a Python file you can make web requests (or run an arbitrary command) to fetch configuration from somewhere. A potential advantage of this is each user can have their own credentials, instead of sharing a single credential for everyone.