Add: Nested options#148
Conversation
…false to copied permalink to make creating auto-start urls easier
…r full auto-start (login->profile-selection->notebook) configuration
…pply kubespawn_overrides from depth > 0 in nests
Auto start
|
@wildintellect - I know you've been thinking of how to maintain image versions, etc. in the fancy-profiles UI. This seems like a really interesting approach - it does introduce quite a lot of changes to the shape of the options, etc. but I also feel like this is the kind of thing that fancy profiles was built to support and I'd like to find a way to allow this kind of functionality and flexibility. @wildintellect @sunu - can I ask the two of you to take a look here and see if it makes sense to you what this PR is trying to do and how useful we think this can be for our own setups, and we can take a call on how we can prioritize working with @rtmiz to get this merged. (And thanks again for making this PR @rtmiz 🙏 - it's incredibly useful to see this as a PoC and I personally like the approach you've taken here.) |
|
From a logic perspective, yes being able to get to old versions of images is important. Not much of an opinion on the technical approach used here, but I will note the config files will get enourmous, we sometimes do 4 versions a year (more if you count bug fix releases, but maybe that's nuanced and not necessary) |
|
@wildintellect You could technically apply the profile_list within the extraConfig field and use python to format it dynamically (or just directly in jupyterhub_config.py). That would drastically save on line-space out of the box. Alternatively we can work in a templating system, which infers values based on a given list of values directly from the .yaml |
I was recently asked if we could support nested options with conditional rendering for our JupyterHub,
for instance choosing an Image and subsequently choosing a version of that image.
This PR is my working prototype of this behavior.
What works:
profile_optionkeys defined like so.This will make a
Versiondrop-down menu appear whenDefault Imageis selected.kubespawner_overridesfrom nested options depth > 0.Any
kubespawner_overrides from lower levels are correctly applied when spawning a pod.Caveats:
pre_spawn_hookBecause the implementation technically works I wanted to create a PR for this and see if there is any interest in such a feature and if there is if there is any way we could implement this functionality smoother (potentially within KubeSpawner)