jupyterhub / kubespawner

Kubernetes spawner for JupyterHub
https://jupyterhub-kubespawner.readthedocs.io
BSD 3-Clause "New" or "Revised" License
531 stars 299 forks source link

Options independent of any profile #802

Open miwig opened 8 months ago

miwig commented 8 months ago

Proposed change

It would be nice if we could define options that are independent of any profile. If profiles are defined, these options should apply to all profiles.

Alternative options

If profiles are not needed and only independent options are desired, a somewhat ugly workaround would be to have a single profile and define the options there. If both profiles and independent options are needed, the only solution is to duplicate the "independent" options into each profile.

Who would use this feature?

Admins that want to give users more fine-grained control over spawn options, e.g. independent settings for CPU limit, image, etc.

Suggest a solution

Mostly duplicating the functionality of profile_options to work without a profile, possibly

If you agree that this is a desirable feature and I haven't overlooked anything, I'd be happy to attempt a PR :)

welcome[bot] commented 8 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. welcome 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:

manics commented 8 months ago

The options set directly on KubeSpawner should already be inherited by all the profiles. Can you give us an example of your desired configuration?

miwig commented 8 months ago

As I understand it, setting options directly on KubeSpawner allows a static configuration, which is modified by the selected profile and further customizable by the user using profile_options. What I would like is to let the user select options, e.g. the CPU limit, independent of a profile. It seems that this is not currently possible.

dimm0 commented 2 months ago
Screenshot 2024-04-24 at 2 16 40 PM

I currently have this form for users. They can pick memory, gpus, region etc, and also pick an image. The way I do it now is super ugly and breaks with every spawner update. It would be nice to have something like this officially supported.