diff --git a/config/clusters/leap/common.values.yaml b/config/clusters/leap/common.values.yaml index 12a2856973..12cf4b8ddd 100644 --- a/config/clusters/leap/common.values.yaml +++ b/config/clusters/leap/common.values.yaml @@ -37,6 +37,9 @@ basehub: name: LEAP url: https://leap-stc.github.io hub: + image: + name: quay.io/2i2c/unlisted-choice-experiment + tag: "0.0.1-0.dev.git.6801.h3f4f0c4a" allowNamedServers: true config: Authenticator: @@ -189,6 +192,13 @@ basehub: cpu_limit: 16 image: &profile_list_profile_options_image display_name: Image + unlisted_choice: &profile_list_unlisted_choice + enabled: True + display_name: "Custom image" + validation_regex: "^.+:.+$" + validation_message: "Must be a valid public docker image, including a tag" + kubespawner_override: + image: "{value}" choices: pangeo_new: display_name: Base Pangeo Notebook ("2023.07.05") @@ -268,6 +278,7 @@ basehub: profile_options: image: display_name: Image + unlisted_choice: *profile_list_unlisted_choice choices: tensorflow_new: display_name: Pangeo Tensorflow ML Notebook ("2023.07.05") diff --git a/helm-charts/basehub/values.yaml b/helm-charts/basehub/values.yaml index 5a588e51cd..b19bd7d554 100644 --- a/helm-charts/basehub/values.yaml +++ b/helm-charts/basehub/values.yaml @@ -697,6 +697,8 @@ jupyterhub: ) c.Spawner.pre_spawn_hook = ensure_db_pvc 05-gh-teams: | + import copy + from textwrap import dedent from tornado import gen, web from oauthenticator.github import GitHubOAuthenticator @@ -745,8 +747,10 @@ jupyterhub: print(f"User {spawner.user.name} is part of teams {' '.join(teams)}") allowed_profiles = [] - - for profile in original_profile_list: + # Make a copy of the original profile_list dict, + # otherwise we might end up modifying it by mistake + profile_list_copy = copy.deepcopy(original_profile_list) + for profile in profile_list_copy: # If there is no ':' in allowed_teams, it's an org and we should check that # differently allowed_orgs = set([o for o in profile.get('allowed_teams', []) if ':' not in o]) diff --git a/helm-charts/images/hub/unlisted-choice-requirements.txt b/helm-charts/images/hub/unlisted-choice-requirements.txt index 2186d5ee7f..27ee25150b 100644 --- a/helm-charts/images/hub/unlisted-choice-requirements.txt +++ b/helm-charts/images/hub/unlisted-choice-requirements.txt @@ -1,3 +1,3 @@ git+https://github.com/yuvipanda/jupyterhub-configurator@ed7e3a0df1e3d625d10903ef7d7fd9c2fbb548db # Brings on using `unlisted_choice` in profile options per https://github.com/2i2c-org/infrastructure/issues/2146 -git+https://github.com/jupyterhub/kubespawner@def501f1d60b8e5629745acb0bcc45b151b1decc +git+https://github.com/jupyterhub/kubespawner@934ef321f72e58bd680d35ea5fd6780b2b8b52c7