I use the pre_spawn_hook capability to get the selected user profile in the KubeSpawner.
that’s the function call I do
I only see the capability of getting a somewhat modified version of the display_name of the profile, and not any other attributes that could be dedicated only to programming and not display, something that would be more predictable.
For instance if the profile display_name is something like “This is the super profile / production”
it ends being something like “this-is-the-super-profile-production” I believe. Which is nice but not predictable and IMHO how it’s called on the UI shouldn’t be a concern for the rest of the code.
Did I miss other profile attributes that could be used here?
- display_name: "Default: Shared, 8 CPU cores"
description: "Your code will run on a shared machine with CPU only."
- display_name: "Personal, 4 CPU cores & 26GB RAM, 1 NVIDIA Tesla K80 GPU"
description: "Your code will run a personal machine with a GPU."
profile_list c.KubeSpawner.profile_list = Union()
List of profiles to offer for selection by the user.
Signature is: List(Dict()), where each item is a dictionary that has two keys:
display_name: the human readable display name (should be HTML safe)
slug: the machine readable slug to identify the profile (missing slugs are generated from display_name)